Skip to content

Commit

Permalink
(fixup) following review
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Mar 28, 2023
1 parent 098a6d1 commit a955ed8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/testutils/test_functional_testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def test_get_functional_test_files_from_directory() -> None:
"using_dir.py should go in a directory that starts with the "
"first letters of 'using_dir'"
)
with pytest.raises(AssertionError):
exc_info.match("incredibly_bold_mischief.py")
assert "incredibly_bold_mischief.py" not in str(exc_info.value)
# Leading underscore mean that this should not fail the assertion
get_functional_test_files_from_directory(DATA_DIRECTORY / "u/_no_issue_here")

Expand All @@ -64,10 +63,10 @@ def test_get_functional_test_files_from_crowded_directory() -> None:
assert exc_info.match("max_overflow: 3 when the max is 1")
with pytest.raises(AssertionError) as exc_info:
get_functional_test_files_from_directory(
DATA_DIRECTORY / "m", max_file_per_directory=2
DATA_DIRECTORY / "m", max_file_per_directory=3
)
assert exc_info.match("m: 4 when the max is 2")
assert exc_info.match("max_overflow: 3 when the max is 2")
assert exc_info.match("m: 4 when the max is 3")
assert "max_overflow" not in str(exc_info.value)


def test_minimal_messages_config_enabled(pytest_config: MagicMock) -> None:
Expand Down

0 comments on commit a955ed8

Please sign in to comment.