[staging-next] python312Packages.types-lxml: fix tests (#378668)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Arne Keller
2025-02-03 16:50:41 +01:00
committed by GitHub
co-authored by Sandro
parent b6f2f81964
commit a4bcd7a293
@@ -13,6 +13,7 @@
typeguard,
types-beautifulsoup4,
typing-extensions,
hypothesis,
}:
buildPythonPackage rec {
@@ -40,6 +41,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
beautifulsoup4
html5lib
hypothesis
lxml
pyright
pytestCheckHook
@@ -48,16 +50,19 @@ buildPythonPackage rec {
pythonImportsCheck = [ "lxml-stubs" ];
# there may only be one conftest.py
preCheck = ''
rm -r tests/static
mv tests/runtime/* tests/
rmdir tests/runtime
substituteInPlace tests/conftest.py \
--replace-fail '"pytest-revealtype-injector",' "" \
--replace-fail 'runtime.register_strategy' 'tests.register_strategy'
'';
disabledTests = [
# AttributeError: 'bytes' object has no attribute 'find_class'
# https://github.com/abelcheung/types-lxml/issues/34
"test_bad_methodfunc"
"test_find_class"
"test_find_rel_links"
"test_iterlinks"
"test_make_links_absolute"
"test_resolve_base_href"
"test_rewrite_links"
"test_single_ns_all_tag_2"
"test_default_ns"
];
meta = with lib; {