Skip to content

Commit

Permalink
FIX: stabilize tests for multithreading (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored Mar 13, 2024
1 parent 7133ea5 commit fb6d005
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/utilities/precommit/test_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ def test_no_context_manager(self, example_config: str):
precommit.append_to_changelog("Fake modification")

def test_context_manager_path(self, this_dir: Path, example_config: str):
input_stream = io.StringIO(example_config)
with pytest.raises(
PrecommitError,
match=r"Fake modification$",
), ModifiablePrecommit.load(this_dir / ".pre-commit-config.yaml") as precommit:
), ModifiablePrecommit.load(input_stream) as precommit:
precommit.append_to_changelog("Fake modification")
yaml = precommit.dumps()
assert yaml == example_config
Expand Down

0 comments on commit fb6d005

Please sign in to comment.