import unittest class TestUniqueChars(unittest.TestCase): def test_unique_chars(self, func): self.assertEqual(func(None), False) self.assertEqual(func(''), True) self.assertEqual(func('foo'), False) self.assertEqual(func('bar'), True) print('Success: test_unique_chars') def main(): test = TestUniqueChars() unique_chars = UniqueChars() test.test_unique_chars(unique_chars.has_unique_chars) try: unique_chars_set = UniqueCharsSet() test.test_unique_chars(unique_chars_set.has_unique_chars) unique_chars_in_place = UniqueCharsInPlace() test.test_unique_chars(unique_chars_in_place.has_unique_chars) except NameError: # Alternate solutions are only defined # in the solutions file pass if __name__ == '__main__': main()