Skip to content

Commit

Permalink
tests/conftest.py: Work around apparent mypy issue.
Browse files Browse the repository at this point in the history
Assertion on tuple length doesn't work?

Signed-off-by: Chris PeBenito <[email protected]>
  • Loading branch information
pebenito committed Oct 28, 2024
1 parent fc79d3a commit 9094078
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def compiled_policy(request: pytest.FixtureRequest) -> Iterable[setools.SELinuxP
kwargs = marker.kwargs if marker else {}

assert len(args) == 1
source_file = args[0]
source_file = args[0] # type: ignore

with tempfile.NamedTemporaryFile("w") as fd:
yield _do_compile(source_file, fd.name, mls=kwargs.get("mls", True),
Expand All @@ -242,8 +242,8 @@ def policy_pair(request: pytest.FixtureRequest) -> \
kwargs = marker.kwargs if marker else {}

assert len(args) == 2
source_file_left = args[0]
source_file_right = args[1]
source_file_left = args[0] # type: ignore
source_file_right = args[1] # type: ignore

with tempfile.NamedTemporaryFile("w") as fd_left:
with tempfile.NamedTemporaryFile("w") as fd_right:
Expand Down

0 comments on commit 9094078

Please sign in to comment.