@@ -15,7 +15,6 @@ def project_root() -> pathlib.Path:
1515
1616def test_cqa_ruff_check (project_root ):
1717 """Test that code passes ruff linting checks."""
18- # Ruff respects pyproject.toml configuration and exclusions
1918 result = subprocess .run (
2019 [sys .executable , "-m" , "ruff" , "check" , "." ],
2120 capture_output = True ,
@@ -32,7 +31,6 @@ def test_cqa_ruff_check(project_root):
3231
3332def test_cqa_ruff_format_check (project_root ):
3433 """Test that code is properly formatted according to ruff."""
35- # Ruff format respects pyproject.toml exclusions
3634 result = subprocess .run (
3735 [sys .executable , "-m" , "ruff" , "format" , "--check" , "." ],
3836 capture_output = True ,
@@ -48,26 +46,23 @@ def test_cqa_ruff_format_check(project_root):
4846
4947
5048def test_cqa_mypy (project_root ):
51- """Test that code passes mypy type checking."""
52- # Mypy uses configuration from pyproject.toml
53- # Run on typemap -- tests not ready yet
54- for subdir in ["typemap" ]:
55- result = subprocess .run (
56- [
57- sys .executable ,
58- "-m" ,
59- "mypy" ,
60- "--config-file" ,
61- project_root / "pyproject.toml" ,
62- subdir ,
63- ],
64- capture_output = True ,
65- text = True ,
66- cwd = project_root ,
67- )
49+ """Test that typemap/ passes mypy type checking."""
50+ result = subprocess .run (
51+ [
52+ sys .executable ,
53+ "-m" ,
54+ "mypy" ,
55+ "--config-file" ,
56+ project_root / "pyproject.toml" ,
57+ "typemap" ,
58+ ],
59+ capture_output = True ,
60+ text = True ,
61+ cwd = project_root ,
62+ )
6863
69- if result .returncode != 0 :
70- output = result .stdout
71- if result .stderr :
72- output += "\n \n " + result .stderr
73- pytest .fail (f"mypy validation failed:\n { output } " , pytrace = False )
64+ if result .returncode != 0 :
65+ output = result .stdout
66+ if result .stderr :
67+ output += "\n \n " + result .stderr
68+ pytest .fail (f"mypy validation failed:\n { output } " , pytrace = False )
0 commit comments