Loading debian/control +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ Depends: ${python3:Depends}, procps, python3-pkg-resources, python3-rstr, python3-distro, ${misc:Depends} Recommends: diffoscope (>= 112~), Loading tests/conftest.py 0 → 100644 +26 −0 Original line number Diff line number Diff line import distro import pytest SUPPORTED_DIST = ["debian", "fedora"] def pytest_configure(config): config.addinivalue_line( "markers", "need_builddeps: need need_builddeps" ) config.addinivalue_line( "markers", "debian: filter tests for debian only" ) config.addinivalue_line( "markers", "fedora: filter tests for fedora only" ) def pytest_runtest_setup(item): # get current dist dist = distro.id() # filter markers supported_dist = set(SUPPORTED_DIST).intersection( mark.name for mark in item.iter_markers()) if supported_dist and dist not in supported_dist: pytest.skip("cannot run on {}".format(dist)) tests/test_reprotest.py +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ def test_command_lines(): assert testbed_args.virtual_server_args == ['schroot', 'unstable-amd64-sbuild'] # TODO: don't call it if we don't have debian/, e.g. for other distros @pytest.mark.debian @pytest.mark.need_builddeps def test_debian_build(virtual_server): # This is a bit dirty though it works - when building the debian package, Loading Loading
debian/control +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ Depends: ${python3:Depends}, procps, python3-pkg-resources, python3-rstr, python3-distro, ${misc:Depends} Recommends: diffoscope (>= 112~), Loading
tests/conftest.py 0 → 100644 +26 −0 Original line number Diff line number Diff line import distro import pytest SUPPORTED_DIST = ["debian", "fedora"] def pytest_configure(config): config.addinivalue_line( "markers", "need_builddeps: need need_builddeps" ) config.addinivalue_line( "markers", "debian: filter tests for debian only" ) config.addinivalue_line( "markers", "fedora: filter tests for fedora only" ) def pytest_runtest_setup(item): # get current dist dist = distro.id() # filter markers supported_dist = set(SUPPORTED_DIST).intersection( mark.name for mark in item.iter_markers()) if supported_dist and dist not in supported_dist: pytest.skip("cannot run on {}".format(dist))
tests/test_reprotest.py +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ def test_command_lines(): assert testbed_args.virtual_server_args == ['schroot', 'unstable-amd64-sbuild'] # TODO: don't call it if we don't have debian/, e.g. for other distros @pytest.mark.debian @pytest.mark.need_builddeps def test_debian_build(virtual_server): # This is a bit dirty though it works - when building the debian package, Loading