def test_pip_install_environ_inherited(self): python_env = Mock() python_env.executable = [] python_env.environ = {} pip_utils.pip_install("blah", python_env) python_env.execute_command.assert_called_once_with( ANY, cwd=None, env=python_env.environ, error_file_name=None, outfile_name=None, shell=False, no_path_search=True)
def test_pip_install_environ_overwritten(self): env_dict = {"a": "b"} python_env = Mock() python_env.executable = [] python_env.environ = {} pip_utils.pip_install("blah", python_env, env=env_dict) python_env.execute_command.assert_called_once_with( ANY, cwd=None, env=env_dict, error_file_name=None, outfile_name=None, shell=False, no_path_search=True)