Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci tests #139

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions setools/policyrep/typeattr.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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:
Expand Down
Loading