So I want to do this code Kata for practice. I want to implement the kata with tdd in separate files:
The algorithm:
# stringcalculator.py
def Add(string):return 1
and the tests:
# stringcalculator.spec.py
from stringcalculator import Add
import unittestclass TestStringCalculator(unittest.TestCase):def add_returns_zero_for_emptyString(self):self.assertEqual(Add(' '), 0)if __name__ == '__main__':unittest.main()
When running the testfile, I get:
Ran 0 tests in 0.000sOK
It should return one failed test however. What do I miss here?