File: test_issue3126.py

package info (click to toggle)
rdflib 7.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 77,852 kB
  • sloc: python: 59,555; sh: 153; makefile: 83; ruby: 74; xml: 45
file content (21 lines) | stat: -rw-r--r-- 487 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pytest

from rdflib import Graph


def test_skolem_de_skolem_roundtrip():
    """Test deskolemization should ignore literals.

    Issue: https://github.com/RDFLib/rdflib/issues/3126
    """

    nt = (
        '<http://example.com> <http://example.com> "http://example.com [some remark]" .'
    )

    graph = Graph().parse(data=nt, format="nt").de_skolemize()

    try:
        graph.de_skolemize()
    except BaseException as ex:
        pytest.fail(f"Unexpected error: {ex}")