File: test_issue432.py

package info (click to toggle)
rdflib 6.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 38,248 kB
  • sloc: python: 39,216; sh: 153; makefile: 110
file content (18 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import rdflib


def test_trig_default_graph():
    ds = rdflib.ConjunctiveGraph()
    data = """
    @prefix : <http://example.com/> .

    <> <b> <c> .
    { <d> <e> <f> . }

    <g1> { <d> <e> <f> . }
    <g2> { <g> <h> <i> . }
    """
    ds.parse(data=data, format="trig", publicID=ds.default_context.identifier)

    assert len(list(ds.contexts())) == 3
    assert len(list(ds.default_context)) == 2