Beispiel #1
0
 def test_install_python_module_raises_exception_on_failure(self, *args,
                                                            **kwargs):
     with self.assertRaises(SystemExit) as cm:
         pkg.install_python_module('fake-python-module')
     self.assertEqual(cm.exception.code, 1)
Beispiel #2
0
 def test_install_python_module_returns_True_on_success(self, *args,
                                                        **kwargs):
     self.assertTrue(pkg.install_python_module('appdirs'))
Beispiel #3
0
 def test_install_python_module_installs_module(self, *args, **kwargs):
     pkg.install_python_module('appdirs')
     self.assertTrue('appdirs' in run('pip list'))
Beispiel #4
0
 def test_install_python_module_raises_exception_on_failure(
         self, *args, **kwargs):
     with self.assertRaises(SystemExit) as cm:
         pkg.install_python_module('fake-python-module')
     self.assertEqual(cm.exception.code, 1)
Beispiel #5
0
 def test_install_python_module_returns_True_on_success(
         self, *args, **kwargs):
     self.assertTrue(pkg.install_python_module('appdirs'))
Beispiel #6
0
 def test_install_python_module_installs_module(self, *args, **kwargs):
     pkg.install_python_module('appdirs')
     self.assertTrue('appdirs' in run('pip list'))