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:
David Rheinsberg 2020-04-21 12:43:04 +02:00 committed by Christian Kellner
parent ff8cd76def
commit 6a7e811af2
3 changed files with 5 additions and 9 deletions

View file

@ -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
View file

@ -0,0 +1 @@
# The `unittest` module requires `__init__.py` to discover a directory.

View file

@ -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()