Example code - Unit test: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

20 March 2024

6 March 2024

  • curprev 15:0515:05, 6 March 2024WikiSysop talk contribs 2,789 bytes +2,789 Created page with "I decided to make some unit tests for my prime number generator, I used as an example last week. I make two files - one file containing the class and one file containing the tests. The files are supposed to be in the same folder. Notice I changed the name of the class a bit. <p> '''File:''' primegenerator.py <pre> # Prime number generator class primegenerator: # Class varible, known primes in consecutive order, can be extended, but must contain these knownprimes..."