Пример #1
0
 def test_run_runs_in_virtualenv(self):
     ve = Virtualenv()
     try:
         output = ve.run('which python', shell=True)
         self.assertTrue(ve.name in output)
     finally:
         ve.destroy()
Пример #2
0
 def test_run_runs_in_virtualenv(self):
     ve = Virtualenv()
     try:
         output = ve.run('which python', shell=True)
         self.assertTrue(ve.name in output)
     finally:
         ve.destroy()
Пример #3
0
 def test_use_existing_virtualenv(self):
     venv = tempfile.mkdtemp()
     os.system('virtualenv %s' % venv)
     ve = Virtualenv(name=venv)
     try:
         output = ve.run('which python', shell=True)
         self.assertTrue(ve.name in output)
     finally:
         ve.destroy()
Пример #4
0
 def test_construct_makes_virtualenv(self):
     temp_env = tempfile.mkdtemp()
     ve = Virtualenv(name=temp_env)
     temp_env_bin = os.path.join(
         temp_env, 'Scripts' if platform.system() == 'Windows' else 'bin')
     try:
         self.assertTrue('activate' in os.listdir(temp_env_bin))
     finally:
         ve.destroy()
Пример #5
0
 def test_use_existing_virtualenv(self):
     venv = tempfile.mkdtemp()
     os.system('virtualenv %s' % venv)
     ve = Virtualenv(name=venv)
     try:
         output = ve.run('which python', shell=True)
         self.assertTrue(ve.name in output)
     finally:
         ve.destroy()
Пример #6
0
 def test_construct_makes_virtualenv(self):
     temp_env = tempfile.mkdtemp()
     ve = Virtualenv(name=temp_env)
     temp_env_bin = os.path.join(
         temp_env, 'Scripts' if platform.system() == 'Windows' else 'bin')
     try:
         self.assertTrue('activate' in os.listdir(temp_env_bin))
     finally:
         ve.destroy()
Пример #7
0
 def test_construct(self):
     ve = Virtualenv()
     self.assertTrue(ve is not None)
     ve.destroy()
Пример #8
0
 def test_destroy_removes_virtualenv(self):
     ve = Virtualenv()
     temp_env = ve.name
     ve.destroy()
     self.assertFalse(os.path.isdir(temp_env))
Пример #9
0
 def test_destroy_removes_virtualenv(self):
     ve = Virtualenv()
     temp_env = ve.name
     ve.destroy()
     self.assertFalse(os.path.isdir(temp_env))
Пример #10
0
 def test_construct(self):
     ve = Virtualenv()
     self.assertTrue(ve is not None)
     ve.destroy()