class MyTestCase(unittest.TestCase): def setUp(self): self.version = Version(1, 2, 3) def test_version_constructor(self): self.assertEqual(self.version.get_current_version_string(), "1.2.3") def test_next_bugfix_version(self): self.assertEqual(self.version.next_bug_fix_version(), "1.2.4") def test_next_minor_version(self): self.assertEqual(self.version.next_minor_version(), "1.3.3") def test_next_major_version(self): self.assertEqual(self.version.next_major_version(), "2.2.3") def test_config_init(self): v = Version.from_config_file("tests/test_version.conf", "CM_LATEST") self.assertEquals(v.get_current_version_string(), "5.4.5")
def setUp(self): self.version = Version(1, 2, 3)