Chris PeBenito
1b3ce1bd81
Merge pull request #139 from pebenito/fix-ci-tests
...
Fix ci tests
2024-10-28 13:38:40 -04:00
Chris PeBenito
0a713c64b3
tests/conftest.py: Work around apparent mypy issue.
...
Assertion on tuple length doesn't work?
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-10-28 13:21:58 -04:00
Chris PeBenito
4fa7e3ded8
tests/conftest.py: Add assertions to fix mypy errors.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-10-28 13:21:57 -04:00
Chris PeBenito
a9e65732f2
Type: Stabilize attribute and alias output in statements.
...
Sort attributes and aliases in Type.statement().
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-10-28 13:21:51 -04:00
Chris PeBenito
525cc9069f
Merge pull request #135 from cgzones/type_gaps
...
Support gaps in type array
2024-10-01 14:31:35 -04:00
Chris PeBenito
f86da4a988
Merge pull request #136 from cgzones/deprecated
...
tests: drop deprecated parameter
2024-10-01 14:31:04 -04:00
Chris PeBenito
f7d0bd2f05
Merge pull request #137 from cgzones/typos
...
Fix typos
2024-10-01 14:29:55 -04:00
Christian Göttsche
8df3dbe112
Fix typos
...
Found by codespell(1) and typos[1].
[1]: https://github.com/crate-ci/typos
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2024-10-01 17:25:26 +02:00
Christian Göttsche
205dbb8ad5
Support gaps in type array
...
Support gaps in the type array which are supported by libsepol.
Encountered while experimenting on a policy optimization step that
removes unused type-attributes.
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2024-10-01 17:22:47 +02:00
Christian Göttsche
7daed1eeb8
tests: drop deprecated parameter
...
tests/gui/conftest.py:20
setools/tests/gui/conftest.py:20: PytestRemovedIn9Warning: The (path: py.path.local) argument is deprecated, please use (collection_path: pathlib.Path)
see https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
def pytest_ignore_collect(collection_path: pathlib.Path, path,
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2024-10-01 17:21:59 +02:00
Chris PeBenito
305c8fa49a
Merge pull request #133 from marshalljmiller/main
...
Correct inclusion of parentheses when outputing constraints
2024-05-06 15:38:40 -04:00
Marshall Miller
2ea10f130d
fixed insertion of parentheses when converting to infix notation
...
Signed-off-by: Marshall Miller <marshall.miller@sealingtech.com>
2024-05-06 15:21:24 -04:00
Chris PeBenito
42aad09ec2
Merge pull request #131 from pebenito/setup-to-pyproject
...
setup.py: Move static definitions to pyproject.toml.
2024-04-26 08:30:33 -04:00
Chris PeBenito
f0acf984e1
Merge pull request #128 from pebenito/nx-optional-fix
...
infoflow/dta: Correct typing for NetworkX.
2024-04-24 13:16:16 -04:00
Chris PeBenito
5718140bfe
setup.py: Clean up implementation.
...
Also use pathlib.Path to better handle path manipulations.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-23 10:38:13 -04:00
Chris PeBenito
2661b1af6d
setup.py: Move static definitions to pyproject.toml.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-23 10:38:11 -04:00
Chris PeBenito
b15f2f2b1c
Merge pull request #129 from pebenito/css-install
...
setup.py: Install CSS files.
2024-04-23 10:36:46 -04:00
Chris PeBenito
70a2fd93c2
tox.ini: Add file listing to install test.
...
Allows review of what files are installed and where.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-23 10:26:22 -04:00
Chris PeBenito
da847de630
setup.py: Install CSS files.
...
Fixes [setools 4.5.0] apol.css is missing from the Python package #124
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-23 08:58:03 -04:00
Chris PeBenito
0a1849b293
infoflow/dta: Correct typing for NetworkX.
...
Quote the annotations so NetworkX is optional again.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-22 14:20:57 -04:00
Chris PeBenito
0f7a1235a1
Merge pull request #127 from pebenito/restructure-tests
...
Restructure tests and update to use pytest fixtures.
2024-04-19 15:02:26 -04:00
Chris PeBenito
0856100fcb
tests/util: Refactor validate_rule() to handle role allows.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 14:54:13 -04:00
Chris PeBenito
c958e67544
tests/library: Move validate_rule to a regular function.
...
Now that unit tests use pytest, validate_rule no longer needs to use "self"
to do assertions. It no longer needs to be a mixin.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:42:20 -04:00
Chris PeBenito
894c695c4b
Remove unused compile_policy utility function.
...
This is replaced by a pytest fixture.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
20d704fa4a
TestUserQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
8ee4d1ce58
TestTypeQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
a5cfda01f5
TestTypeAttributeQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
9878bf8d43
TestTERuleQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
d5f8aafcef
TestSensitivityQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
89e6c52018
TestRoleQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
299ef1447a
TestRBACRuleQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
4bbc5bd806
TestPortconQuery: Update tests to pytest fixtures.
...
Fix PortconRange typing stub to include rich comparisons.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
7258d2364c
TestPolCapQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
a4f8dffcf1
TestPirqconQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
ae0dd8e174
TestPermissionMap: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
aeb602d8ed
TestPcideviceconQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
c112e6a621
TestObjClassQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
fe1d4a2af9
TestNodeconQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
5a4922227a
TestNetifconQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:39 -04:00
Chris PeBenito
62baa4417e
TestMLSRuleQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:41:36 -04:00
Chris PeBenito
c786b5ae58
TestIoportconQuery: Update tests to pytest fixtures.
...
Fix IoportconRange typing stub to include rich comparisons.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00
Chris PeBenito
66c741e397
TestIomemconQuery: Update tests to pytest fixtures.
...
Fix IomemconRange typing stub to include rich comparisons.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00
Chris PeBenito
43e764d5ec
TestInitialSIDQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00
Chris PeBenito
1b156fe9cf
TestInfoFlowAnalysis: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00
Chris PeBenito
09546cb832
TestIbpkeyconQuery: Update tests to pytest fixtures.
...
Fix IbpkeyconRange typing stub to include rich comparisons.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00
Chris PeBenito
17a968196c
TestIbendportconQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00
Chris PeBenito
a776e73fbe
TestGenfsconQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00
Chris PeBenito
3a7e05b2af
TestFSUseQuery: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00
Chris PeBenito
8142b856b3
TestDomainTransitionAnalysis: Update tests to pytest fixtures.
...
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00
Chris PeBenito
3284589cc0
TestPolicyDifference: Update tests to pytest fixtures.
...
Add a new fixture that provides two compiled policies. Update validate rule
mixin for pytest fixtures.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2024-04-19 13:40:57 -04:00