AttributeError: partially initialized module 'unittest' has no attribute 'TestCase' (most likely due to a circular import)

Viewed 17
import unittest

class TestSum(unittest.TestCase):

    def test_sum(self):
        self.assertEqual(sum([1, 2, 3]), 6, "Should be 6")

    def test_sum_tuple(self):
        self.assertEqual(sum((1, 2, 2)), 6, "Should be 6")

if __name__ == '__main__':
    unittest.main()

Unit test that worked before is not working now. Is there a point you missed?

0 Answers
Related