Skip to content

Commit a6ddb4f

Browse files
authored
Merge pull request #1033 from olebole/python3
Use python3 as executable instead of python in tests
2 parents fa886d0 + 46502e2 commit a6ddb4f

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
2.9.0 (unreleased)
22
------------------
33

4+
- Fix more use of 'python' where 'python3' is intended. [#1033]
5+
46
2.8.2 (2021-12-06)
57
------------------
68

compatibility_tests/test_file_compatibility.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def get_supported_versions(env_path):
100100
installed in the specified virtual environment.
101101
"""
102102
script = r"""import asdf; print("\n".join(str(v) for v in asdf.versioning.supported_versions))"""
103-
output = env_check_output(env_path, "python", "-c", script)
103+
output = env_check_output(env_path, "python3", "-c", script)
104104
return [asdf.versioning.AsdfVersion(v) for v in output.split("\n")]
105105

106106

@@ -110,7 +110,7 @@ def get_installed_version(env_path):
110110
virtual environment.
111111
"""
112112
script = r"""import asdf; print(asdf.__version__)"""
113-
return StrictVersion(env_check_output(env_path, "python", "-c", script))
113+
return StrictVersion(env_check_output(env_path, "python3", "-c", script))
114114

115115

116116
@pytest.fixture(scope="module", params=PATCH_VERSIONS)
@@ -176,7 +176,7 @@ def test_file_compatibility(asdf_version, env_path, tmpdir):
176176
if asdf_version >= MIN_VERSION_NEW_FILES:
177177
current_file_path = Path(str(tmpdir))/"test-current.asdf"
178178
generate_file(current_file_path, standard_version)
179-
assert env_run(env_path, "python", ASSERT_SCRIPT_PATH, current_file_path, capture_output=True), (
179+
assert env_run(env_path, "python3", ASSERT_SCRIPT_PATH, current_file_path, capture_output=True), (
180180
"asdf library version {} failed to read an ASDF Standard {} ".format(asdf_version, standard_version) +
181181
"file produced by this code"
182182
)
@@ -185,7 +185,7 @@ def test_file_compatibility(asdf_version, env_path, tmpdir):
185185
# can be read by the current version of the code.
186186
if asdf_version >= MIN_VERSION_OLD_FILES:
187187
old_file_path = Path(str(tmpdir))/"test-old.asdf"
188-
assert env_run(env_path, "python", GENERATE_SCRIPT_PATH, old_file_path, str(standard_version), capture_output=True), (
188+
assert env_run(env_path, "python3", GENERATE_SCRIPT_PATH, old_file_path, str(standard_version), capture_output=True), (
189189
"asdf library version {} failed to generate an ASDF Standard {} file".format(asdf_version, standard_version)
190190
)
191191
assert_file_correct(old_file_path), (

0 commit comments

Comments
 (0)