コード例 #1
0
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")
コード例 #2
0
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")
コード例 #3
0
	def setUp(self):
		self.version = Version(1, 2, 3)
コード例 #4
0
 def setUp(self):
     self.version = Version(1, 2, 3)