diff options
author | Elie Roux <roux.elie@gmail.com> | 2022-12-30 17:13:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-30 17:13:42 +0100 |
commit | 953507042cd35840211db72e2ed345bc848bc433 (patch) | |
tree | edac0aab8c0bd5eb4fb2321561b398857d4ea891 /test | |
parent | 8213b7465783e636a394c86fd2387a44523d9c2f (diff) | |
download | rdflib-953507042cd35840211db72e2ed345bc848bc433.tar.gz |
feat: do not write prefix for empty graph id (#2160)
Since the names of empty graphs do not appear in the serialization, do not consider them for namespace issues.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_trig.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_trig.py b/test/test_trig.py index dbb1adbf..30bff634 100644 --- a/test/test_trig.py +++ b/test/test_trig.py @@ -192,3 +192,9 @@ def test_prefixes(): assert "ns2: <http://ex.org/docs/".encode("latin-1") in data, data assert "<ns2:document1>".encode("latin-1") not in data, data assert "ns2:document1".encode("latin-1") in data, data + + +def test_issue_2154(): + ds = rdflib.Dataset() + sg = ds.serialize(format="trig") + assert "prefix" not in sg, sg |