Skip to content

Commit

Permalink
bump python version in conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Neale committed Sep 17, 2024
1 parent 692c811 commit 24d5340
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 5 additions & 6 deletions ddev/tests/cli/meta/scripts/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

from ddev.repo.core import Repository

OLD_PYTHON_VERSION = "3.11"
NEW_PYTHON_VERSION = "3.12"
# Whenenever we bump python version, we also need to bump the python
# version in the conftest.py.
OLD_PYTHON_VERSION = "3.12"
NEW_PYTHON_VERSION = "3.13"


@pytest.fixture
Expand Down Expand Up @@ -43,7 +45,7 @@ def fake_repo(tmp_path_factory, config_file, ddev):
f"""[env.collectors.datadog-checks]
[[envs.default.matrix]]
python = ["2.7", "{OLD_PYTHON_VERSION}"]
python = ["{OLD_PYTHON_VERSION}"]
""",
)
Expand All @@ -68,7 +70,6 @@ def fake_repo(tmp_path_factory, config_file, ddev):
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: {OLD_PYTHON_VERSION}",
]
""",
Expand All @@ -86,7 +87,6 @@ def fake_repo(tmp_path_factory, config_file, ddev):
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: {OLD_PYTHON_VERSION}",
]
""",
Expand Down Expand Up @@ -134,7 +134,6 @@ def fake_repo(tmp_path_factory, config_file, ddev):
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: {OLD_PYTHON_VERSION}",
]
""",
Expand Down
3 changes: 1 addition & 2 deletions ddev/tests/cli/meta/scripts/test_upgrade_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def test_upgrade_python(fake_repo, ddev):
result = ddev('meta', 'scripts', 'upgrade-python', NEW_PYTHON_VERSION)

assert result.exit_code == 0, result.output
assert 'Python upgrades\n\n' in result.output
assert 'Passed: ' in result.output
assert result.output.endswith('Python upgrades\n\nPassed: 9\n')

contents = constant_file.read_text()
assert f'PYTHON_VERSION = {OLD_PYTHON_VERSION!r}' not in contents
Expand Down

0 comments on commit 24d5340

Please sign in to comment.