@@ -63,7 +63,7 @@ def test_flow_when_python_version_has_changed(monkeypatch, tmp_path, runner):
63
63
assert "Updating the information" in result .output
64
64
65
65
# Run with a fake version and not updating the environment.
66
- monkeypatch .setattr ("pytask_environment.collect .sys.version" , fake_version )
66
+ monkeypatch .setattr ("pytask_environment.logging .sys.version" , fake_version )
67
67
68
68
result = runner .invoke (cli )
69
69
assert result .exit_code == 1
@@ -75,8 +75,8 @@ def test_flow_when_python_version_has_changed(monkeypatch, tmp_path, runner):
75
75
assert python .path == real_python_executable
76
76
77
77
# Run with a fake version and updating the environment.
78
- monkeypatch .setattr ("pytask_environment.collect .sys.version" , fake_version )
79
- monkeypatch .setattr ("pytask_environment.collect .sys.executable" , "new_path" )
78
+ monkeypatch .setattr ("pytask_environment.logging .sys.version" , fake_version )
79
+ monkeypatch .setattr ("pytask_environment.logging .sys.executable" , "new_path" )
80
80
81
81
result = runner .invoke (cli , ["--update-environment" ])
82
82
assert result .exit_code == 0
@@ -114,7 +114,7 @@ def test_python_version_changed(
114
114
assert "Updating the information" in result .output
115
115
116
116
# Run with a fake version and not updating the environment.
117
- monkeypatch .setattr ("pytask_environment.collect .sys.version" , fake_version )
117
+ monkeypatch .setattr ("pytask_environment.logging .sys.version" , fake_version )
118
118
119
119
result = runner .invoke (cli , [tmp_path .as_posix ()])
120
120
assert result .exit_code == expected
@@ -143,7 +143,7 @@ def test_environment_changed(
143
143
assert "Updating the information" in result .output
144
144
145
145
# Run with a fake version and not updating the environment.
146
- monkeypatch .setattr ("pytask_environment.collect .sys.executable" , "new_path" )
146
+ monkeypatch .setattr ("pytask_environment.logging .sys.executable" , "new_path" )
147
147
148
148
result = runner .invoke (cli , [tmp_path .as_posix ()])
149
149
assert result .exit_code == expected
0 commit comments