Exemplo n.º 1
0
 def test_execution_fullname(self):
     argv = ['install', 'nvie/times']
     pipgh.install(False, argv, dry_run=False, output=False)
     rst = subprocess.check_output(['pip', 'freeze'],
                                   stderr=subprocess.PIPE)
     self.assertTrue(
         any(l.startswith(u'times'.encode('utf-8')) for l in rst.split()))
Exemplo n.º 2
0
 def test_execution_requirements(self):
     argv = ['install', '-r', 'tests/execution/requirements.txt']
     pipgh.install(False, argv, dry_run=False, output=False)
     rst = subprocess.check_output(['pip', 'freeze'], stderr=subprocess.PIPE)
     #
     self.assertTrue(any(l.startswith(u'docopt'.encode('utf-8'))
                         for l in rst.split()))
Exemplo n.º 3
0
 def test_execution_requirements(self):
     argv = ['install', '-r', 'tests/execution/requirements.txt']
     pipgh.install(False, argv, dry_run=False, output=False)
     rst = subprocess.check_output(['pip', 'freeze'],
                                   stderr=subprocess.PIPE)
     #
     self.assertTrue(
         any(l.startswith(u'docopt'.encode('utf-8')) for l in rst.split()))
Exemplo n.º 4
0
 def test_dry_run(self):
     # pipgh install <full_name>             2
     # pipgh install <full_name> <ref>       3
     # pipgh install -r <requirements.txt>   3
     argvs = [
         (['install', 'requests'],
          ['requests'],
          [None]),
         (['install', 'requests', 'special'],
          ['requests'],
          ['special']),
         (['install', '-r', 'tests/cli/requirements.txt'],
          ['docopt/docopt', 'mitsuhiko/flask', 'tornadoweb/tornado', 'kennethreitz/requests'],
          ['0.6.2', '23cf923c7c2e4a3808e6c71b6faa34d1749d4cb6', 'stable', None]),
     ]
     for argv, repo_labels, refs in argvs:
         rst = pipgh.install(False, argv, dry_run=True)
         self.assertEqual(rst, (repo_labels, refs))
Exemplo n.º 5
0
 def test_dry_run(self):
     # pipgh install <full_name>             2
     # pipgh install <full_name> <ref>       3
     # pipgh install -r <requirements.txt>   3
     argvs = [
         (['install', 'requests'], ['requests'], [None]),
         (['install', 'requests', 'special'], ['requests'], ['special']),
         (['install', '-r', 'tests/execution/requirements.txt'], [
             'docopt/docopt', 'mitsuhiko/flask', 'tornadoweb/tornado',
             'kennethreitz/requests'
         ], [
             '0.6.2', '23cf923c7c2e4a3808e6c71b6faa34d1749d4cb6', 'stable',
             None
         ]),
     ]
     for argv, repo_labels, refs in argvs:
         rst = pipgh.install(False, argv, dry_run=True)
         self.assertEqual(rst, (repo_labels, refs))
Exemplo n.º 6
0
 def test_execution_fullname(self):
     argv = ['install', 'nvie/times']
     pipgh.install(False, argv, dry_run=False, output=False)
     rst = subprocess.check_output(['pip', 'freeze'], stderr=subprocess.PIPE)
     self.assertTrue(any(l.startswith(u'times'.encode('utf-8'))
                         for l in rst.split()))