@@ -34,23 +34,32 @@ def test_valid_python_versions(self) -> None:
3434 "--help" , # Don't actually create project
3535 )
3636 # Help should work with valid versions
37- assert result .success or "Initialize a new Aegis Stack project" in result .stdout
37+ assert (
38+ result .success
39+ or "Initialize a new Aegis Stack project" in result .stdout
40+ )
3841
3942 def test_invalid_python_version (self ) -> None :
4043 """Test that invalid Python versions are rejected."""
4144 result = run_aegis_command (
4245 "init" , "test-project" , "--python-version" , "3.10" , "--no-interactive"
4346 )
4447 assert not result .success
45- assert "Invalid Python version" in result .stderr or "Invalid Python version" in result .stdout
48+ assert (
49+ "Invalid Python version" in result .stderr
50+ or "Invalid Python version" in result .stdout
51+ )
4652
4753 def test_invalid_python_version_format (self ) -> None :
4854 """Test that malformed Python versions are rejected."""
4955 result = run_aegis_command (
5056 "init" , "test-project" , "--python-version" , "invalid" , "--no-interactive"
5157 )
5258 assert not result .success
53- assert "Invalid Python version" in result .stderr or "Invalid Python version" in result .stdout
59+ assert (
60+ "Invalid Python version" in result .stderr
61+ or "Invalid Python version" in result .stdout
62+ )
5463
5564
5665@pytest .mark .parametrize ("engine" , ["cookiecutter" , "copier" ])
@@ -88,6 +97,9 @@ def test_default_python_version(
8897 project_path , "pyproject.toml" , 'requires-python = ">=3.13"'
8998 )
9099
100+ # Check Dockerfile has correct Python version
101+ assert_file_contains (project_path , "Dockerfile" , "FROM python:3.13-slim" )
102+
91103 @pytest .mark .slow
92104 def test_python_version_3_11 (
93105 self ,
@@ -119,6 +131,9 @@ def test_python_version_3_11(
119131 project_path , "pyproject.toml" , 'requires-python = ">=3.11"'
120132 )
121133
134+ # Check Dockerfile has correct Python version
135+ assert_file_contains (project_path , "Dockerfile" , "FROM python:3.11-slim" )
136+
122137 @pytest .mark .slow
123138 def test_python_version_3_12 (
124139 self ,
@@ -150,6 +165,9 @@ def test_python_version_3_12(
150165 project_path , "pyproject.toml" , 'requires-python = ">=3.12"'
151166 )
152167
168+ # Check Dockerfile has correct Python version
169+ assert_file_contains (project_path , "Dockerfile" , "FROM python:3.12-slim" )
170+
153171 @pytest .mark .slow
154172 def test_python_version_3_13 (
155173 self ,
@@ -181,6 +199,9 @@ def test_python_version_3_13(
181199 project_path , "pyproject.toml" , 'requires-python = ">=3.13"'
182200 )
183201
202+ # Check Dockerfile has correct Python version
203+ assert_file_contains (project_path , "Dockerfile" , "FROM python:3.13-slim" )
204+
184205 @pytest .mark .slow
185206 def test_python_version_with_components (
186207 self ,
0 commit comments