diff --git a/ddev/tests/cli/meta/scripts/conftest.py b/ddev/tests/cli/meta/scripts/conftest.py index d92dc4481cfcc..4189c4fa3aefd 100644 --- a/ddev/tests/cli/meta/scripts/conftest.py +++ b/ddev/tests/cli/meta/scripts/conftest.py @@ -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 @@ -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}"] """, ) @@ -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}", ] """, @@ -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}", ] """, @@ -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}", ] """, diff --git a/ddev/tests/cli/meta/scripts/test_upgrade_python.py b/ddev/tests/cli/meta/scripts/test_upgrade_python.py index 2f66a824406a6..0f72910563c37 100644 --- a/ddev/tests/cli/meta/scripts/test_upgrade_python.py +++ b/ddev/tests/cli/meta/scripts/test_upgrade_python.py @@ -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