Merge pull request #139 from pebenito/fix-ci-tests

Fix ci tests
This commit is contained in:
Chris PeBenito 2024-10-28 13:38:40 -04:00 committed by GitHub
commit 1b3ce1bd81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View File

@ -107,11 +107,11 @@ cdef class Type(BaseType):
stmt = f"type {self.name}"
if count > 1:
stmt += f" alias {{ {' '.join(self._aliases)} }}"
stmt += f" alias {{ {' '.join(sorted(self._aliases))} }}"
elif count == 1:
stmt += f" alias {self._aliases[0]}"
for attr in self._attrs:
stmt += f", {attr}"
if self._attrs:
stmt += f", {', '.join(a.name for a in sorted(self._attrs))}"
stmt += ";"
return stmt

View File

@ -225,7 +225,8 @@ def compiled_policy(request: pytest.FixtureRequest) -> Iterable[setools.SELinuxP
args = marker.args if marker else ()
kwargs = marker.kwargs if marker else {}
source_file = args[0]
assert len(args) == 1
source_file = args[0] # type: ignore
with tempfile.NamedTemporaryFile("w") as fd:
yield _do_compile(source_file, fd.name, mls=kwargs.get("mls", True),
@ -240,8 +241,9 @@ def policy_pair(request: pytest.FixtureRequest) -> \
args = marker.args if marker else ()
kwargs = marker.kwargs if marker else {}
source_file_left = args[0]
source_file_right = args[1]
assert len(args) == 2
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: