Skip to content

Commit 3f68840

Browse files
committed
fix(tests): test_cli_inprocess.py for the --ci case, I added the creation of a baseline with the current version of Python and the explicit transfer of --baseline in order not to fall on the python_version discrepancy in the matrix
1 parent b868229 commit 3f68840

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/test_cli_inprocess.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,14 @@ def _bad_stat(_path: str) -> dict[str, int]:
930930

931931
monkeypatch.setattr(cli, "file_stat_signature", _bad_stat)
932932
_patch_parallel(monkeypatch)
933-
_run_main(monkeypatch, [str(tmp_path), *extra_args])
933+
args = [str(tmp_path), *extra_args]
934+
if "--ci" in extra_args:
935+
baseline = _write_baseline(
936+
tmp_path / "baseline.json",
937+
python_version=f"{sys.version_info.major}.{sys.version_info.minor}",
938+
)
939+
args.extend(["--baseline", str(baseline)])
940+
_run_main(monkeypatch, args)
934941
out = capsys.readouterr().out
935942
assert "Skipping file" in out
936943

0 commit comments

Comments
 (0)