You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
739 B

  1. '''
  2. Created on Jan 26, 2014
  3. @author: Chris
  4. '''
  5. import unittest
  6. from gooey.gui.option_reader import OptionReader
  7. class FakeClassWithoutImplementation(OptionReader):
  8. def __init__(self):
  9. pass
  10. class FakeClassWithImplementation(OptionReader):
  11. def __init__(self):
  12. pass
  13. def GetOptions(self):
  14. pass
  15. class Test(unittest.TestCase):
  16. def test_mixin_classes_throws_typeerror_without_implementation(self):
  17. with self.assertRaises(TypeError):
  18. fake_class = FakeClassWithoutImplementation()
  19. def test_mixin_classes_passes_with_implementation(self):
  20. fc = FakeClassWithImplementation()
  21. if __name__ == "__main__":
  22. #import sys;sys.argv = ['', 'Test.testName']
  23. unittest.main()