diff options
Diffstat (limited to 'test/test_nquads.py')
-rw-r--r-- | test/test_nquads.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/test_nquads.py b/test/test_nquads.py index 5dae133c..bb3234d6 100644 --- a/test/test_nquads.py +++ b/test/test_nquads.py @@ -9,7 +9,9 @@ TEST_BASE = "test/nquads.rdflib" class NQuadsParserTest(unittest.TestCase): def _load_example(self): g = ConjunctiveGraph() - nq_path = os.path.relpath(os.path.join(TEST_DIR, 'nquads.rdflib/example.nquads'), os.curdir) + nq_path = os.path.relpath( + os.path.join(TEST_DIR, "nquads.rdflib/example.nquads"), os.curdir + ) with open(nq_path, "rb") as data: g.parse(data, format="nquads") return g @@ -39,7 +41,9 @@ class NQuadsParserTest(unittest.TestCase): def test_context_is_optional(self): g = ConjunctiveGraph() - nq_path = os.path.relpath(os.path.join(TEST_DIR, 'nquads.rdflib/test6.nq'), os.curdir) + nq_path = os.path.relpath( + os.path.join(TEST_DIR, "nquads.rdflib/test6.nq"), os.curdir + ) with open(nq_path, "rb") as data: g.parse(data, format="nquads") assert len(g) > 0 @@ -57,9 +61,7 @@ class NQuadsParserTest(unittest.TestCase): g.get_context(uri2).add((bob, likes, pizza)) s = g.serialize(format="nquads", encoding="latin-1") - self.assertEqual( - len([x for x in s.split(b"\n") if x.strip()]), 2 - ) + self.assertEqual(len([x for x in s.split(b"\n") if x.strip()]), 2) g2 = ConjunctiveGraph() g2.parse(data=s, format="nquads") @@ -74,7 +76,9 @@ class NQuadsParserTest(unittest.TestCase): class BnodeContextTest(unittest.TestCase): def setUp(self): self.data = open("test/nquads.rdflib/bnode_context.nquads", "rb") - self.data_obnodes = open("test/nquads.rdflib/bnode_context_obj_bnodes.nquads", "rb") + self.data_obnodes = open( + "test/nquads.rdflib/bnode_context_obj_bnodes.nquads", "rb" + ) def tearDown(self): self.data.close() |