for when we randomly pick the wrong variable
Markus Gerstel
6 years ago
109 | 109 | with pytest.raises(NotImplementedError): |
110 | 110 | procrunner.run_process(mock.Mock(), -1, False, environment_override=copy.copy(mock_env2)) |
111 | 111 | random_environment_variable = list(os.environ)[0] |
112 | if random_environment_variable == list(mock_env2)[0]: | |
113 | random_environment_variable = list(os.environ)[1] | |
112 | 114 | random_environment_value = os.getenv(random_environment_variable) |
113 | 115 | assert random_environment_variable and random_environment_variable != list(mock_env2)[0] |
114 | 116 | assert mock_subprocess.Popen.call_args[1]['env'][list(mock_env2)[0]] == mock_env2[list(mock_env2)[0]] |