6.1.0: pytest is failing in test/test_xmlliterals.py::testHTML
unit · Issue #1519 · RDFLib/rdflib (original) (raw)
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
- PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-rdflib-6.1.0-2.fc35.x86_64/usr/lib/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-rdflib-6.1.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
- /usr/bin/pytest -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0, configfile: setup.cfg plugins: forked-1.4.0, shutil-1.7.0, virtualenv-1.7.0, xdist-2.5.0, cov-2.12.1, flake8-1.0.7, hypothesis-6.31.5 collected 4040 items
rdflib/init.py . [ 0%] rdflib/collection.py .... [ 0%] rdflib/compare.py .. [ 0%] rdflib/container.py . [ 0%] rdflib/events.py . [ 0%] rdflib/graph.py ........ [ 0%] rdflib/parser.py . [ 0%] rdflib/paths.py . [ 0%] rdflib/query.py . [ 0%] rdflib/resource.py . [ 0%] rdflib/term.py .............. [ 0%] rdflib/util.py ..... [ 0%] rdflib/extras/describer.py ...... [ 1%] rdflib/extras/infixowl.py .......... [ 1%] rdflib/namespace/init.py ..... [ 1%] rdflib/plugins/parsers/jsonld.py . [ 1%] rdflib/plugins/parsers/notation3.py ... [ 1%] rdflib/plugins/parsers/nquads.py . [ 1%] rdflib/plugins/serializers/jsonld.py . [ 1%] rdflib/plugins/shared/jsonld/util.py . [ 1%] rdflib/plugins/stores/sparqlstore.py . [ 1%] rdflib/tools/csv2rdf.py . [ 1%] rdflib/tools/rdfpipe.py . [ 1%] test/helper.py . [ 1%] test/test_980.py . [ 1%] test/test_aggregate_graphs.py . [ 1%] test/test_auditable.py ........................ [ 2%] test/test_b64_binary.py . [ 2%] test/test_batch_add.py .......... [ 2%] test/test_bnode_ncname.py . [ 2%] test/test_canonicalization.py ..........x [ 2%] test/test_comparison.py .......... [ 3%] test/test_conjunctive_graph.py .... [ 3%] test/test_container.py ................. [ 3%] test/test_conventions.py . [ 3%] test/test_create_input_source.py .. [ 3%] test/test_csv2rdf.py .. [ 3%] test/test_dataset.py ssssssss.... [ 4%] test/test_datetime.py ....... [ 4%] test/test_dawg.py .........................................ss....................................................................................................... [ 7%] .................................................................................................................................................................... [ 12%] .........................................................s...s....ss..ssssssssssss....ssss...........ss..sss.sss..sssssssssssssss................................... [ 16%] .........................................................................................sssssss.................................................................... [ 20%] ............................................................................................................................... [ 23%] test/test_definednamespace_creator.py ... [ 23%] test/test_diff.py ..x [ 23%] test/test_duration.py ...... [ 23%] test/test_empty_xml_base.py .. [ 23%] test/test_evaluate_bind.py ... [ 23%] test/test_events.py . [ 23%] test/test_expressions.py ...... [ 23%] test/test_extras_external_graph_libs.py ss [ 23%] test/test_finalnewline.py . [ 23%] test/test_graph.py ssssssssss.......... [ 24%] test/test_graph_cbd.py .. [ 24%] test/test_graph_context.py ssssssssss.......... [ 25%] test/test_graph_formula.py ..s [ 25%] test/test_graph_http.py .... [ 25%] test/test_graph_items.py . [ 25%] test/test_graph_operator.py ... [ 25%] test/test_hex_binary.py .. [ 25%] test/test_initbindings.py .......................... [ 25%] test/test_issue084.py ........ [ 26%] test/test_issue1003.py . [ 26%] test/test_issue1043.py . [ 26%] test/test_issue1141.py ... [ 26%] test/test_issue1160.py . [ 26%] test/test_issue1404.py . [ 26%] test/test_issue1484.py .. [ 26%] test/test_issue160.py . [ 26%] test/test_issue161.py . [ 26%] test/test_issue184.py . [ 26%] test/test_issue190.py xx [ 26%] test/test_issue200.py . [ 26%] test/test_issue209.py . [ 26%] test/test_issue223.py . [ 26%] test/test_issue247.py .. [ 26%] test/test_issue248.py . [ 26%] test/test_issue274.py ................................. [ 27%] test/test_issue363.py .. [ 27%] test/test_issue379.py .. [ 27%] test/test_issue381.py ....... [ 27%] test/test_issue432.py . [ 27%] test/test_issue446.py . [ 27%] test/test_issue492.py . [ 27%] test/test_issue523.py . [ 27%] test/test_issue532.py . [ 27%] test/test_issue535.py . [ 27%] test/test_issue545.py . [ 27%] test/test_issue554.py . [ 27%] test/test_issue563.py .. [ 27%] test/test_issue579.py . [ 28%] test/test_issue604.py . [ 28%] test/test_issue655.py . [ 28%] test/test_issue715.py . [ 28%] test/test_issue733.py .. [ 28%] test/test_issue801.py . [ 28%] test/test_issue893.py . [ 28%] test/test_issue910.py .... [ 28%] test/test_issue920.py . [ 28%] test/test_issue923.py . [ 28%] test/test_issue953.py . [ 28%] test/test_issue977.py .. [ 28%] test/test_issue_git_200.py . [ 28%] test/test_issue_git_336.py . [ 28%] test/test_literal.py ........................x [ 29%] test/test_memory_store.py .. [ 29%] test/test_mulpath_n3.py . [ 29%] test/test_n3.py ................ [ 29%] test/test_n3_suite.py ............................................................ [ 31%] test/test_namespace.py ........x.......... [ 31%] test/test_nodepickler.py ... [ 31%] test/test_normalizedString.py .... [ 31%] test/test_nquads.py ........... [ 31%] test/test_nquads_w3c.py ..................................................................................... [ 34%] test/test_nt_misc.py ...................... [ 34%] test/test_nt_w3c.py ................................................ [ 35%] test/test_parse_file_guess_format.py .... [ 35%] test/test_parser.py .... [ 35%] test/test_parser_helpers.py . [ 36%] test/test_parser_hext.py .... [ 36%] test/test_parser_reads_from_pathlike_object.py . [ 36%] test/test_parser_structure.py . [ 36%] test/test_path_div_future.py . [ 36%] test/test_prefixTypes.py . [ 36%] test/test_preflabel.py ..... [ 36%] test/test_prettyxml.py ....... [ 36%] test/test_rdf_lists.py .. [ 36%] test/test_rdfxml.py .. [ 36%] test/test_roundtrip.py ............................................................................................................................................. [ 40%] .................................................................................................................................................................... [ 44%] .................................................................................................................................................................... [ 48%] .................................................................................................................................................................... [ 52%] .................................................................................................................................................................... [ 56%] .................................................................................................................................................................... [ 60%] .................................................................................................................................................................... [ 64%] .................................................................................................................................................................... [ 68%] ....... [ 68%] test/test_seq.py .. [ 68%] test/test_serializer.py .... [ 68%] test/test_serializer_hext.py ..... [ 68%] test/test_serializer_longturtle.py . [ 68%] test/test_serializer_trix.py .. [ 69%] test/test_serializer_turtle.py ..... [ 69%] test/test_serializer_xml.py ..... [ 69%] test/test_slice.py . [ 69%] test/test_sparql.py ......... [ 69%] test/test_sparql_agg_distinct.py .... [ 69%] test/test_sparql_agg_undef.py ....... [ 69%] test/test_sparql_construct_bindings.py . [ 69%] test/test_sparql_datetime.py .... [ 69%] test/test_sparql_operators.py ... [ 70%] test/test_sparql_parser.py .. [ 70%] test/test_sparql_service.py ....... [ 70%] test/test_sparqlstore.py ........ [ 70%] test/test_sparqlupdatestore.py ssssssssssss [ 70%] test/test_sparqlupdatestore_mock.py . [ 70%] test/test_store.py .. [ 70%] test/test_store_berkeleydb.py ssssss [ 70%] test/test_swap_n3.py ...ssss...s.s.sss.....s....sss [ 71%] test/test_term.py ....... [ 71%] test/test_testutils.py ................. [ 72%] test/test_tokendatatype.py ..... [ 72%] test/test_trig.py .........s. [ 72%] test/test_trig_w3c.py .............................................................................................................................................. [ 76%] .................................................................................................................................................................... [ 80%] ............................. [ 80%] test/test_trix_parse.py ... [ 81%] test/test_tsvresults.py . [ 81%] test/test_turtle_sort_issue613.py .. [ 81%] test/test_turtle_w3c.py ............................................................................................................................................ [ 84%] ................................................................................................................................................... [ 88%] test/test_util.py ............................x............... [ 89%] test/test_wide_python.py . [ 89%] test/test_xmlliterals.py ...F [ 89%] test/testutils.py .. [ 89%] test/jsonld/test_api.py . [ 89%] test/jsonld/test_compaction.py ........... [ 89%] test/jsonld/test_context.py ................ [ 90%] test/jsonld/test_localsuite.py .. [ 90%] test/jsonld/test_named_graphs.py ... [ 90%] test/jsonld/test_onedotone.py ...................................................................................................................................... [ 93%] ................................................................................................................................ [ 96%] test/jsonld/test_pythonparse.py . [ 96%] test/jsonld/test_testsuite.py ............................................................................................................................... [ 99%] test/jsonld/test_util.py .x [100%]
================================================================================= FAILURES ================================================================================= _________________________________________________________________________________ testHTML _________________________________________________________________________________
def testHTML():
l1 = Literal("<msg>hello</msg>", datatype=RDF.XMLLiteral)
assert l1.value is not None, "xml must have been parsed"
assert l1.datatype == RDF.XMLLiteral, "literal must have right datatype"
l2 = Literal("<msg>hello</msg>", datatype=RDF.HTML)
assert l2.value is not None, "xml must have been parsed"
E AssertionError: xml must have been parsed E assert None is not None E + where None = rdflib.term.Literal('hello', datatype=rdflib.term.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML')).value
test/test_xmlliterals.py:86: AssertionError ============================================================================= warnings summary ============================================================================= rdflib/graph.py:1274: 62 warnings test/test_canonicalization.py: 14 warnings test/test_dawg.py: 902 warnings test/test_prettyxml.py: 10 warnings test/test_rdfxml.py: 2 warnings test/test_serializer_xml.py: 10 warnings /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/graph.py:1274: DeprecationWarning: graph.load() is deprecated, it will be removed in rdflib 6.0.0. Please use graph.parse() instead. warn(
rdflib/graph.py: 5 warnings test/test_preflabel.py: 5 warnings /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/graph.py:833: DeprecationWarning: graph.preferredLabel() is deprecated and will be removed in rdflib 6.0.0. warn(
rdflib/resource.py::rdflib.resource rdflib/resource.py::rdflib.resource rdflib/resource.py::rdflib.resource /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/graph.py:774: DeprecationWarning: graph.label() is deprecated and will be removed in rdflib 6.0.0. warn(
rdflib/resource.py::rdflib.resource /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/graph.py:871: DeprecationWarning: graph.comment() is deprecated and will be removed in rdflib 6.0.0. warn(
rdflib/resource.py::rdflib.resource test/test_seq.py::SeqTestCase::testSeq /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/graph.py:989: DeprecationWarning: graph.seq() is deprecated and will be removed in rdflib 6.0.0. warn(
test/test_literal.py::TestParseBoolean::testNonFalseBoolean /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/term.py:1437: UserWarning: Parsing weird boolean, 'abcd' does not map to True or False warnings.warn(
test/test_literal.py::TestParseBoolean::testNonFalseBoolean /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/term.py:1437: UserWarning: Parsing weird boolean, '10' does not map to True or False warnings.warn(
test/test_n3_suite.py: 1 warning test/test_roundtrip.py: 10 warnings /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/term.py:1325: UserWarning: Serializing weird numerical rdflib.term.Literal('xy.z', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#double')) warnings.warn("Serializing weird numerical %r" % self)
test/test_n3_suite.py: 1 warning test/test_roundtrip.py: 10 warnings /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/term.py:1325: UserWarning: Serializing weird numerical rdflib.term.Literal('+1.0z', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#double')) warnings.warn("Serializing weird numerical %r" % self)
test/test_n3_suite.py: 1 warning test/test_roundtrip.py: 10 warnings /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/term.py:1325: UserWarning: Serializing weird numerical rdflib.term.Literal('ab.c', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#double')) warnings.warn("Serializing weird numerical %r" % self)
test/test_namespace.py::NamespacePrefixTest::test_closed_namespace /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/test/test_namespace.py:214: UserWarning: DefinedNamespace does not address deprecated properties warn("DefinedNamespace does not address deprecated properties")
test/test_rdf_lists.py::OWLCollectionTest::testCollectionRDFXML /home/tkloczko/rpmbuild/BUILD/rdflib-6.1.0/rdflib/plugins/serializers/rdfxml.py:277: UserWarning: Assertions on rdflib.term.BNode('N15c8768b107e45df932505c272ead082') other than RDF.first and RDF.rest are ignored ... including RDF.List self.predicate(predicate, object, depth + 1)
test/test_util.py::TestUtilTermConvert::test_util_from_n3_expectliteralandlangdtype /usr/lib64/python3.8/unittest/case.py:633: UserWarning: Code: fr is not defined in namespace XSD method()
-- Docs: https://docs.pytest.org/en/stable/warnings.html ========================================================================= short test summary info ========================================================================== SKIPPED [4] test/test_dataset.py:41: Dependencies for store 'BerkeleyDB' not available! SKIPPED [1] test/test_dataset.py:134: No SPARQL endpoint for SPARQLUpdateStore (tests skipped) SKIPPED [1] test/test_dataset.py:81: No SPARQL endpoint for SPARQLUpdateStore (tests skipped) SKIPPED [1] test/test_dataset.py:173: No SPARQL endpoint for SPARQLUpdateStore (tests skipped) SKIPPED [1] test/test_dataset.py:160: No SPARQL endpoint for SPARQLUpdateStore (tests skipped) SKIPPED [50] test/test_dawg.py:348: Skipped SKIPPED [2] test/test_dawg.py:211: Skipped SKIPPED [1] test/test_extras_external_graph_libs.py:8: couldn't find networkx SKIPPED [1] test/test_extras_external_graph_libs.py:57: couldn't find graph_tool SKIPPED [10] test/test_graph.py:29: Dependencies for store 'BerkeleyDB' not available! SKIPPED [10] test/test_graph_context.py:20: Dependencies for store 'BerkeleyDB' not available! SKIPPED [1] test/test_graph_formula.py:27: Dependencies for store 'BerkeleyDB' not available! SKIPPED [12] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:153: http://localhost:3031 is unavailable. SKIPPED [1] test/test_store_berkeleydb.py:89: skipping as berkleydb is missing SKIPPED [1] test/test_store_berkeleydb.py:120: skipping as berkleydb is missing SKIPPED [1] test/test_store_berkeleydb.py:55: skipping as berkleydb is missing SKIPPED [1] test/test_store_berkeleydb.py:78: skipping as berkleydb is missing SKIPPED [1] test/test_store_berkeleydb.py:64: skipping as berkleydb is missing SKIPPED [1] test/test_store_berkeleydb.py:32: skipping as berkleydb is missing SKIPPED [1] test/test_swap_n3.py:74: syntax_zero_objects skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_neg_literal_predicate skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_neg_keywords3 skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_zero_predicates skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_this_rules skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_equals1 skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_neg_formula_predicate skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_neg_single_quote skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_equals2 skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_neg_thisadoc skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_too_nested skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_trailing_semicolon skipped, known issue SKIPPED [1] test/test_swap_n3.py:74: syntax_this_quantifiers skipped, known issue SKIPPED [1] test/test_trig.py:119: Iterative serialization currently produces 16 copies of everything XFAIL test/test_canonicalization.py::TestConsistency::test_consistent_ids reason: XFAIL test/test_diff.py::TestDiff::test_subsets reason: XFAIL test/test_issue190.py::test1 Known issue with newlines in text XFAIL test/test_issue190.py::test2 Known issue with newlines in text XFAIL test/test_literal.py::TestXsdLiterals::test_make_literals_ki reason: XFAIL test/test_namespace.py::ClosedNamespaceTest::test_repr_ef reason: XFAIL test/test_util.py::TestUtilTermConvert::test_util_from_n3_not_escapes_xf reason: XFAIL test/jsonld/test_util.py::URLTests::test_norm_url_xfail reason: FAILED test/test_xmlliterals.py::testHTML - AssertionError: xml must have been parsed ============================================= 1 failed, 3916 passed, 115 skipped, 8 xfailed, 1054 warnings in 64.30s (0:01:04) =============================================