File: test_issue492.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 (23 lines) | stat: -rw-r--r-- 517 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
22
23
# test for https://github.com/RDFLib/rdflib/issues/492

#!/usr/bin/env python3

import rdflib


def test_issue492():
    query = """
    prefix owl: <http://www.w3.org/2002/07/owl#>
    prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    select ?x
    where
    {
        ?x rdf:rest/rdf:first _:6.
        ?x rdf:rest/rdf:first _:5.
    }
    """
    print(rdflib.__version__)
    g = rdflib.Graph()

    # raised a TypeError: unorderable types: SequencePath() < SequencePath()
    result = g.query(query)