def test_update_exception(self): """ Package.update() exception test """ Config.params['cvsupdate'] = 'wrongcvs' with self.assertRaises(PackageError) as context: Package.update() self.assertTrue(PackageError == context.expected) Config.params['cvsupdate'] = '/usr/bin/git pull origin master'
def test_update_windows(self): """ Package.update() test """ Config.params['cfg'] = 'setup.cfg' Config.params['update'] = '{status}' setattr(sys, 'is_windows', True) expected = Package.update() self.assertIsNotNone(expected)
def test_update_unix(self): """ Package.update() unix test """ Config.params['cfg'] = 'setup.cfg' Config.params['update'] = '{status}' expected = Package.update() self.assertIsNotNone(expected) self.assertIs(type(expected), str)
def test_update_exception(self): """ Package.update() exception test """ with self.assertRaises(PackageError) as context: Package.update() self.assertTrue(PackageError == context.expected)