test: '{. -> ./mod}/test_util_selinux.py'
Move the 'test_util_selinux.py' test into the module-unittest subdirectory. Drop the '__main__' hookup while at it. `python -m unittest --help` explains how you can run individual tests.
This commit is contained in:
parent
ff8cd76def
commit
6a7e811af2
3 changed files with 5 additions and 9 deletions
5
.github/workflows/tests.yml
vendored
5
.github/workflows/tests.yml
vendored
|
|
@ -87,11 +87,6 @@ jobs:
|
|||
cd osbuild
|
||||
python3 -m unittest -v test.test_util_ostree
|
||||
|
||||
- name: Run test_util_selinux
|
||||
run: |
|
||||
cd osbuild
|
||||
python3 -m unittest -v test.test_util_selinux
|
||||
|
||||
rpm_build:
|
||||
name: "📦 RPM"
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
1
test/mod/__init__.py
Normal file
1
test/mod/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
# The `unittest` module requires `__init__.py` to discover a directory.
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
#
|
||||
# Tests for the 'osbuild.util.selinux' module.
|
||||
#
|
||||
|
||||
import io
|
||||
import unittest
|
||||
|
||||
|
|
@ -36,7 +40,3 @@ class TestObjectStore(unittest.TestCase):
|
|||
|
||||
policy = selinux.config_get_policy(cfg)
|
||||
self.assertEqual(policy, 'targeted')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue