Esempio n. 1
0
    def test_version_exception(self):
        """ Package.version() exception test """

        Config.params['cfg'] = 'wrong.cfg'
        with self.assertRaises(PackageError) as context:
            Package.version()
            self.assertTrue(PackageError == context.expected)
Esempio n. 2
0
    def test_version(self):
        """ Package.version() test """

        Config.params['cfg'] = 'setup.cfg'
        expected = Package.version()
        self.assertIsNotNone(expected)
        self.assertIs(type(expected), str)