55import sys
66
77
8- def test_no_changes_implies_no_regression (baseline_report : Path , tmp_path : Path ):
8+ def test_no_changes_implies_no_regression (
9+ baseline_report : Path , tmp_path : Path , pyrefly_script_path : Path
10+ ):
911
1012 current_report = tmp_path / "pyrefly-test-current-report.json"
1113
@@ -14,7 +16,7 @@ def test_no_changes_implies_no_regression(baseline_report: Path, tmp_path: Path)
1416 process : subprocess .CompletedProcess = subprocess .run (
1517 [
1618 sys .executable ,
17- ".github/scripts/check_pyrefly_coverage.py" ,
19+ pyrefly_script_path ,
1820 "--baseline_report_path" ,
1921 baseline_report ,
2022 "--current_report_path" ,
@@ -28,7 +30,7 @@ def test_no_changes_implies_no_regression(baseline_report: Path, tmp_path: Path)
2830
2931
3032def test_increasing_type_coverage_implies_no_regression (
31- baseline_report : Path , tmp_path : Path
33+ baseline_report : Path , tmp_path : Path , pyrefly_script_path : Path
3234):
3335
3436 current_report = tmp_path / "pyrefly-test-current-report.json"
@@ -48,7 +50,7 @@ def test_increasing_type_coverage_implies_no_regression(
4850 process : subprocess .CompletedProcess = subprocess .run (
4951 [
5052 sys .executable ,
51- ".github/scripts/check_pyrefly_coverage.py" ,
53+ pyrefly_script_path ,
5254 "--baseline_report_path" ,
5355 baseline_report ,
5456 "--current_report_path" ,
@@ -62,7 +64,7 @@ def test_increasing_type_coverage_implies_no_regression(
6264
6365
6466def test_decreasing_type_coverage_implies_regression (
65- baseline_report : Path , tmp_path : Path
67+ baseline_report : Path , tmp_path : Path , pyrefly_script_path : Path
6668):
6769
6870 current_report = tmp_path / "pyrefly-test-current-report.json"
@@ -82,7 +84,7 @@ def test_decreasing_type_coverage_implies_regression(
8284 process : subprocess .CompletedProcess = subprocess .run (
8385 [
8486 sys .executable ,
85- ".github/scripts/check_pyrefly_coverage.py" ,
87+ pyrefly_script_path ,
8688 "--baseline_report_path" ,
8789 baseline_report ,
8890 "--current_report_path" ,
@@ -97,7 +99,7 @@ def test_decreasing_type_coverage_implies_regression(
9799
98100
99101def test_adding_fully_annotated_file_implies_no_regression (
100- baseline_report : Path , tmp_path : Path
102+ baseline_report : Path , tmp_path : Path , pyrefly_script_path : Path
101103):
102104
103105 current_report = tmp_path / "pyrefly-test-current-report.json"
@@ -138,7 +140,7 @@ def test_adding_fully_annotated_file_implies_no_regression(
138140 process : subprocess .CompletedProcess = subprocess .run (
139141 [
140142 sys .executable ,
141- ".github/scripts/check_pyrefly_coverage.py" ,
143+ pyrefly_script_path ,
142144 "--baseline_report_path" ,
143145 baseline_report ,
144146 "--current_report_path" ,
@@ -152,7 +154,7 @@ def test_adding_fully_annotated_file_implies_no_regression(
152154
153155
154156def test_adding_partially_annotated_file_implies_regression (
155- baseline_report : Path , tmp_path : Path
157+ baseline_report : Path , tmp_path : Path , pyrefly_script_path : Path
156158):
157159
158160 current_report = tmp_path / "pyrefly-test-current-report.json"
@@ -193,7 +195,7 @@ def test_adding_partially_annotated_file_implies_regression(
193195 process : subprocess .CompletedProcess = subprocess .run (
194196 [
195197 sys .executable ,
196- ".github/scripts/check_pyrefly_coverage.py" ,
198+ pyrefly_script_path ,
197199 "--baseline_report_path" ,
198200 baseline_report ,
199201 "--current_report_path" ,
0 commit comments