I am writing a unites to test my codes but in the end it says ran 0 tests. This is my code for my unites:
import roman1
import roman2
import unittest
class KnownValues(unittest.TestCase):
known_values = ((1, 'I'),
(2, 'II'),
(3, 'III'),
(4, 'IV'),
(5, 'V'))
def test_to_roman_values(self):
for integer, numeral in self.known_values:
result = roman1.to_roman(integer)
self.assertEqual(numeral, result)
if __name__ == '__main__':
unittest.main()
But it says ran 0 tests in 0 seconds. I was able to run another unites I wrote fine and the setup is basically the same. Is something wrong in my code? I am using python from mac OS X
Aucun commentaire:
Enregistrer un commentaire