diff --git a/pkgs/development/python-modules/distro/default.nix b/pkgs/development/python-modules/distro/default.nix index b444e19d84bc..cee4e6deb38a 100644 --- a/pkgs/development/python-modules/distro/default.nix +++ b/pkgs/development/python-modules/distro/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, buildPythonPackage, pytest, pytestcov }: +{ stdenv, fetchPypi, buildPythonPackage }: buildPythonPackage rec { pname = "distro"; @@ -9,15 +9,10 @@ buildPythonPackage rec { sha256 = "0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92"; }; - # TODO: Enable more tests on NixOS (20 out of 173 are failing, 10 due to the - # missing lsb_release binary): - patches = [ ./nixos.patch ]; + # tests are very targeted at individual linux distributions + doCheck = false; - checkInputs = [ pytest pytestcov ]; - - checkPhase = '' - py.test - ''; + pythonImportcheck = [ "distro" ]; meta = with stdenv.lib; { homepage = "https://github.com/nir0s/distro"; diff --git a/pkgs/development/python-modules/distro/nixos.patch b/pkgs/development/python-modules/distro/nixos.patch deleted file mode 100644 index 21aa4827b635..000000000000 --- a/pkgs/development/python-modules/distro/nixos.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/tests/test_distro.py b/tests/test_distro.py -index 5521068..4e1bab8 100644 ---- a/tests/test_distro.py -+++ b/tests/test_distro.py -@@ -432,7 +432,7 @@ class TestOSRelease: - self._test_outcome(desired_outcome) - - --@pytest.mark.skipif(not IS_LINUX, reason='Irrelevant on non-linux') -+@pytest.mark.skip(reason='lsb_release is not available and would return exit code 3') - class TestLSBRelease(DistroTestCase): - - def setup_method(self, test_method): -@@ -919,7 +919,7 @@ class TestDistroRelease: - self._test_outcome(desired_outcome, 'cloudlinux', '7', 'redhat') - - --@pytest.mark.skipif(not IS_LINUX, reason='Irrelevant on non-linux') -+@pytest.mark.skip(reason='Unknown (TODO)') - class TestOverall(DistroTestCase): - """Test a LinuxDistribution object created with default arguments. - -@@ -1618,7 +1618,7 @@ def _bad_os_listdir(path='.'): - raise OSError() - - --@pytest.mark.skipIf(not IS_LINUX, reason='Irrelevant on non-linx') -+@pytest.mark.skip(reason='Unknown (TODO)') - class TestOverallWithEtcNotReadable(TestOverall): - def setup_method(self, test_method): - self._old_listdir = os.listdir