コード例 #1
0
ファイル: test_pkg.py プロジェクト: ClusterHQ/bookshelf
 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)
コード例 #2
0
ファイル: test_pkg.py プロジェクト: ClusterHQ/bookshelf
 def test_install_python_module_returns_True_on_success(self, *args,
                                                        **kwargs):
     self.assertTrue(pkg.install_python_module('appdirs'))
コード例 #3
0
ファイル: test_pkg.py プロジェクト: ClusterHQ/bookshelf
 def test_install_python_module_installs_module(self, *args, **kwargs):
     pkg.install_python_module('appdirs')
     self.assertTrue('appdirs' in run('pip list'))
コード例 #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)
コード例 #5
0
 def test_install_python_module_returns_True_on_success(
         self, *args, **kwargs):
     self.assertTrue(pkg.install_python_module('appdirs'))
コード例 #6
0
 def test_install_python_module_installs_module(self, *args, **kwargs):
     pkg.install_python_module('appdirs')
     self.assertTrue('appdirs' in run('pip list'))