depot/third_party/nixpkgs/pkgs/development/python-modules/subunit/default.nix
Default email 14910f5943 Project import generated by Copybara.
GitOrigin-RevId: 5aaed40d22f0d9376330b6fa413223435ad6fee5
2022-01-13 15:06:32 -05:00

38 lines
844 B
Nix

{ buildPythonPackage
# pkgs dependencies
, check
, cppunit
, pkg-config
, subunit
, pythonOlder
# python dependencies
, fixtures
, hypothesis
, pytest
, testscenarios
, testtools
, unittest2
}:
buildPythonPackage {
inherit (subunit) name src meta;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ check cppunit ];
propagatedBuildInputs = [ testtools ];
checkInputs = [ testscenarios hypothesis fixtures pytest unittest2 ];
# requires unittest2, which no longer supported in 3.10
doCheck = pythonOlder "3.10";
# ignore tests which call shell code, or call methods which haven't been implemented
checkPhase = ''
pytest python/subunit \
--ignore=python/subunit/tests/test_{output_filter,test_protocol{,2}}.py
'';
postPatch = ''
sed -i 's/version=VERSION/version="${subunit.version}"/' setup.py
'';
}