

def test_register_setup_virtualenvs(self):
    pack_dir = os.path.join(get_fixtures_base_path(), 'dummy_pack_1')
    cmd = (BASE_CMD_ARGS + [('--register-pack=%s' % pack_dir), '--register-setup-virtualenvs'])
    (exit_code, stdout, stderr) = run_command(cmd=cmd)
    self.assertTrue(('Setting up virtualenv for pack "dummy_pack_1"' in stderr))
    self.assertTrue(('Setup virtualenv for 1 pack(s)' in stderr))
    self.assertEqual(exit_code, 0)
    cmd = (BASE_CMD_ARGS + ['--register-setup-virtualenvs'])
    (exit_code, stdout, stderr) = run_command(cmd=cmd)
    self.assertTrue(('Setup virtualenv for 4 pack(s)' in stderr))
    self.assertEqual(exit_code, 0)

dataset/ETHPy150Open StackStorm/st2/st2common/tests/integration/test_register_content_script.py ContentRegisterScripTestCase.test_register_setup_virtualenvs/original