Codebase list python-procrunner / 419fef3
for when we randomly pick the wrong variable Markus Gerstel 6 years ago
1 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
109109 with pytest.raises(NotImplementedError):
110110 procrunner.run_process(mock.Mock(), -1, False, environment_override=copy.copy(mock_env2))
111111 random_environment_variable = list(os.environ)[0]
112 if random_environment_variable == list(mock_env2)[0]:
113 random_environment_variable = list(os.environ)[1]
112114 random_environment_value = os.getenv(random_environment_variable)
113115 assert random_environment_variable and random_environment_variable != list(mock_env2)[0]
114116 assert mock_subprocess.Popen.call_args[1]['env'][list(mock_env2)[0]] == mock_env2[list(mock_env2)[0]]