Tests: prerequisites checking reworked.
Prerequisites check moved to the module level to simplify class structure. Discovery and prerequisites checks functions moved to the separate files. Introduced "require" fixture to provide per-test requirements check.
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
import pytest
|
||||
from unit.applications.lang.python import TestApplicationPython
|
||||
|
||||
prerequisites = {'modules': {'python': 'any'}, 'privileged_user': True}
|
||||
|
||||
|
||||
class TestPythonIsolation(TestApplicationPython):
|
||||
prerequisites = {'modules': {'python': 'any'}}
|
||||
|
||||
def test_python_isolation_chroot(self, is_su, temp_dir):
|
||||
if not is_su:
|
||||
pytest.skip('requires root')
|
||||
|
||||
isolation = {
|
||||
'rootfs': temp_dir,
|
||||
}
|
||||
def test_python_isolation_chroot(self, temp_dir):
|
||||
isolation = {'rootfs': temp_dir}
|
||||
|
||||
self.load('ns_inspect', isolation=isolation)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user