kiwi-el8/test/unit/oci_tools/base_test.py
Marcus Schäfer 9c9250ebc4
Support nose and xunit style tests
The modifications in this commit allows the unit tests
to run on both, pytest 6.x (nose test layout) and the new
pytest 7.x (xunit test layout). This Fixes #2072 in a
much nicer way. Thanks much to @smarlowucf
2022-02-26 20:26:18 +01:00

50 lines
1.3 KiB
Python

from pytest import raises
from kiwi.oci_tools.base import OCIBase
class TestOCIBase:
def setup(self):
self.oci = OCIBase()
def setup_method(self, cls):
self.setup()
def test_init_container(self):
with raises(NotImplementedError):
self.oci.init_container()
def test_import_container_image(self):
with raises(NotImplementedError):
self.oci.import_container_image('oci-archive:image.xz')
def test_export_container_image(self):
with raises(NotImplementedError):
self.oci.export_container_image(
'image.xz', 'docker-archive', 'myimage:tag'
)
def test_unpack(self):
with raises(NotImplementedError):
self.oci.unpack()
def test_sync_rootfs(self):
with raises(NotImplementedError):
self.oci.sync_rootfs('root_dir')
def test_import_rootfs(self):
with raises(NotImplementedError):
self.oci.import_rootfs('root_dir')
def test_repack(self):
with raises(NotImplementedError):
self.oci.repack({})
def test_set_config(self):
with raises(NotImplementedError):
self.oci.set_config({})
def test_post_process(self):
with raises(NotImplementedError):
self.oci.post_process()