python3Packages.html5lib: use pytestCheckHook
This commit is contained in:
parent
28e1b1a50a
commit
49cf63ccc9
2 changed files with 15 additions and 12 deletions
|
@ -1,12 +1,11 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, flake8
|
|
||||||
, pytest_4
|
|
||||||
, pytest-expect
|
|
||||||
, mock
|
|
||||||
, six
|
, six
|
||||||
, webencodings
|
, webencodings
|
||||||
|
, mock
|
||||||
|
, pytest-expect
|
||||||
|
, pytestCheckHook_5
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -18,17 +17,16 @@ buildPythonPackage rec {
|
||||||
sha256 = "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f";
|
sha256 = "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ flake8 pytest_4 pytest-expect mock ];
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
six webencodings
|
six
|
||||||
|
webencodings
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkInputs = [
|
||||||
# remove test causing error
|
mock
|
||||||
# https://github.com/html5lib/html5lib-python/issues/411
|
pytest-expect
|
||||||
rm html5lib/tests/test_stream.py
|
pytestCheckHook_5
|
||||||
py.test
|
];
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://github.com/html5lib/html5lib-python";
|
homepage = "https://github.com/html5lib/html5lib-python";
|
||||||
|
|
|
@ -137,6 +137,11 @@ in {
|
||||||
# it should not override the version of pytest that is used for say
|
# it should not override the version of pytest that is used for say
|
||||||
# Python 2. This is an ugly hack that is needed now because the hook
|
# Python 2. This is an ugly hack that is needed now because the hook
|
||||||
# propagates the package.
|
# propagates the package.
|
||||||
|
pytestCheckHook_5 = if isPy3k then
|
||||||
|
self.pytestCheckHook.override { pytest = self.pytest_5; }
|
||||||
|
else
|
||||||
|
self.pytestCheckHook;
|
||||||
|
|
||||||
pytestCheckHook_6_1 = if isPy3k then
|
pytestCheckHook_6_1 = if isPy3k then
|
||||||
self.pytestCheckHook.override { pytest = self.pytest_6_1; }
|
self.pytestCheckHook.override { pytest = self.pytest_6_1; }
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue