This is my code:
import unittest
from sallad.Puppgift import Kundenssallad
class Test_kundenssallad(unittest.TestCase):
def test_av_objekt(self):
namn = "Grekisksallad"
slutpris = 60
tillval = "gurka"
kundenssallad = Kundenssallad(namn, slutpris, tillval)
self.assertIsInstance(kundenssallad, Kundenssallad)
self.assertEqual(kundenssallad.slutpris, 60)
self.assertEqual(kundenssallad.tillval, "gurka")
if __name__ == "__main__":
unittest.main()
Upon running this code in PyCharm, I get:
Testing started at 11:32 ...
Process finished with exit code 0
I expected the program to print something like:
...
----------------------------------------------------------------------
Ran 3 tests in 0.000s
OK
Why do the tests not seem to execute?
test_av_objekt-method doesn't get past some point, or if it manages to execute to its end.