Skip to content

Commit

Permalink
test: convert test/test_sparql/test_construct_bindings.py to pytest (
Browse files Browse the repository at this point in the history
…#2062)

Straight forward as possible conversion from unittest to pytest.
  • Loading branch information
aucampia committed Jul 29, 2022
1 parent e16e219 commit b24d0c8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/test_sparql/test_construct_bindings.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import unittest
from test.utils import eq_

from rdflib import Graph, Literal, URIRef
from rdflib.plugins.sparql import prepareQuery


class TestConstructInitBindings(unittest.TestCase):
class TestConstructInitBindings:
def test_construct_init_bindings(self):
"""
This is issue https://github.com/RDFLib/rdflib/issues/1001
Expand Down Expand Up @@ -35,4 +32,4 @@ def test_construct_init_bindings(self):
initBindings={"a": Literal("A"), "b": Literal("B"), "c": Literal("C")},
)

eq_(sorted(results, key=lambda x: str(x[1])), expected)
assert sorted(results, key=lambda x: str(x[1])) == expected

0 comments on commit b24d0c8

Please sign in to comment.