def test_local_version_exception(self): """ Package.local_version() exception test """ Config.params['cfg'] = 'wrong.cfg' with self.assertRaises(PackageError) as context: Package.local_version() self.assertTrue(PackageError == context.expected)
def test_local_version(self): """ Package.local_version() test """ Config.params['cfg'] = 'setup.cfg' actual = FileSystem.readcfg('setup.cfg').get('info', 'version') expected = Package.local_version() self.assertEqual(actual, expected)