22from pathlib import Path
33
44from rdflib .term import URIRef
5+
56sys .path .append (str (Path (__file__ ).parent .parent .absolute ()))
67from rdflib import Graph
7- from rdflib .namespace import NAMESPACE_PREFIXES_CORE , NAMESPACE_PREFIXES_RDFLIB
8- from rdflib .namespace import OWL , RDFS
8+ from rdflib .namespace import (
9+ NAMESPACE_PREFIXES_CORE ,
10+ NAMESPACE_PREFIXES_RDFLIB ,
11+ OWL ,
12+ RDFS ,
13+ )
914
1015
1116def test_core_prefixes_bound ():
@@ -22,8 +27,9 @@ def test_rdflib_prefixes_bound():
2227 g = Graph (bind_namespaces = "rdflib" )
2328
2429 # the core 5 + the extra 23 namespaces with prefixes
25- assert len (list (g .namespaces ())) == \
26- len (NAMESPACE_PREFIXES_CORE ) + len (list (NAMESPACE_PREFIXES_RDFLIB ))
30+ assert len (list (g .namespaces ())) == len (NAMESPACE_PREFIXES_CORE ) + len (
31+ list (NAMESPACE_PREFIXES_RDFLIB )
32+ )
2733
2834
2935def test_cc_prefixes_bound ():
@@ -60,10 +66,15 @@ def test_replace():
6066
6167 g .bind ("rdfs" , "http://example.com" , replace = False )
6268
63- assert ("rdfs" , URIRef ("http://example.com" )) not in list (g .namespace_manager .namespaces ())
64- assert ("rdfs1" , URIRef ("http://example.com" )) in list (g .namespace_manager .namespaces ())
65-
69+ assert ("rdfs" , URIRef ("http://example.com" )) not in list (
70+ g .namespace_manager .namespaces ()
71+ )
72+ assert ("rdfs1" , URIRef ("http://example.com" )) in list (
73+ g .namespace_manager .namespaces ()
74+ )
6675
6776 g .bind ("rdfs" , "http://example.com" , replace = True )
6877
69- assert ("rdfs" , URIRef ("http://example.com" )) in list (g .namespace_manager .namespaces ())
78+ assert ("rdfs" , URIRef ("http://example.com" )) in list (
79+ g .namespace_manager .namespaces ()
80+ )
0 commit comments