2018-10-27 23:52:57 +02:00
|
|
|
{ buildPythonPackage
|
2020-03-30 23:57:50 +02:00
|
|
|
# pkgs dependencies
|
|
|
|
, check
|
|
|
|
, cppunit
|
|
|
|
, pkg-config
|
|
|
|
, subunit
|
|
|
|
|
|
|
|
# python dependencies
|
|
|
|
, fixtures
|
|
|
|
, hypothesis
|
|
|
|
, pytest
|
2018-10-27 23:52:57 +02:00
|
|
|
, testscenarios
|
2020-03-30 23:57:50 +02:00
|
|
|
, testtools
|
2018-10-27 23:52:57 +02:00
|
|
|
}:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
buildPythonPackage {
|
2020-03-30 23:57:50 +02:00
|
|
|
inherit (subunit) name src meta;
|
2018-10-27 23:52:57 +02:00
|
|
|
|
2020-03-30 23:57:50 +02:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ check cppunit ];
|
2018-11-04 18:04:55 +01:00
|
|
|
propagatedBuildInputs = [ testtools ];
|
2018-10-27 23:52:57 +02:00
|
|
|
|
2020-03-30 23:57:50 +02:00
|
|
|
checkInputs = [ testscenarios hypothesis fixtures pytest ];
|
|
|
|
# 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
|
2018-10-27 23:52:57 +02:00
|
|
|
'';
|
|
|
|
|
2020-03-30 23:57:50 +02:00
|
|
|
patchPhase = ''
|
|
|
|
sed -i 's/version=VERSION/version="${subunit.version}"/' setup.py
|
|
|
|
'';
|
2018-10-27 23:52:57 +02:00
|
|
|
}
|