Skip to content

Commit

Permalink
tests/conftest.py: Add assertions to fix mypy errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris PeBenito <[email protected]>
  • Loading branch information
pebenito committed Oct 28, 2024
1 parent a9e6573 commit 4fa7e3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def compiled_policy(request: pytest.FixtureRequest) -> Iterable[setools.SELinuxP
args = marker.args if marker else ()
kwargs = marker.kwargs if marker else {}

assert len(args) == 1
source_file = args[0]

with tempfile.NamedTemporaryFile("w") as fd:
Expand All @@ -240,6 +241,7 @@ def policy_pair(request: pytest.FixtureRequest) -> \
args = marker.args if marker else ()
kwargs = marker.kwargs if marker else {}

assert len(args) == 2
source_file_left = args[0]
source_file_right = args[1]

Expand Down

0 comments on commit 4fa7e3d

Please sign in to comment.