Skip to content

test_graph.py::test_guess_format_for_parse_http_text_plain regression #3192

@gjhiggins

Description

@gjhiggins

A recently-introduced URL in test/test_graph/test_graph.py is returning 406: Not Acceptable causing test_guess_format_for_parse_http_text_plain to fail:

poetry run pytest test/test_graph/test_graph.py::test_guess_format_for_parse_http_text_plain

I fixed this locally by swapping out the github URL for a W3C URL:

diff --git a/test/test_graph/test_graph.py b/test/test_graph/test_graph.py
index 1c95b05f..092199e5 100644
--- a/test/test_graph/test_graph.py
+++ b/test/test_graph/test_graph.py
@@ -399,7 +399,8 @@ def test_guess_format_for_parse_http_text_plain():
     assert len(graph) > 0
 
     # A url that returns content-type text/html.
-    url = "https://github.com/RDFLib/rdflib/issues/2734"
+    # url = "https://github.com/RDFLib/rdflib/issues/2734"
+    url = "https://www.w3.org/TR/REC-rdf-syntax/"
     with pytest.raises(PluginException):
         graph = Graph().parse(url)
 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions