@@ -285,19 +285,18 @@ def testStoreLiterals(self):
285
285
self .graph .add ((bob , says , something ))
286
286
self .graph .commit ()
287
287
288
-
289
288
objs = list (self .graph .objects (subject = bob , predicate = says ))
290
289
for o in objs :
291
290
if o .value == u'hello' :
292
291
self .assertEquals (o .language , 'en' )
293
292
elif o .value == u'こんにちは' :
294
293
self .assertEquals (o .language , 'ja' )
295
294
elif o .value == u'something' :
296
- self .assertIsNone (o .language )
295
+ self .assertEquals (o .language , None )
297
296
else :
298
297
self .fail ()
299
298
self .assertEquals (len (list (objs )), 3 )
300
-
299
+
301
300
def testStoreLiteralsXml (self ):
302
301
bob = self .bob
303
302
says = URIRef (u'http://www.rdflib.net/terms/says' )
@@ -306,7 +305,7 @@ def testStoreLiteralsXml(self):
306
305
Literal (u'こんにちは' , lang = 'ja' ),
307
306
Literal (u'les garçons à Noël reçoivent des œufs' , lang = 'fr' )]
308
307
309
- testdoc = (PY3 and bytes (xmltestdocXml ,"UTF-8" )) or xmltestdocXml
308
+ testdoc = (PY3 and bytes (xmltestdocXml , "UTF-8" )) or xmltestdocXml
310
309
311
310
self .graph .parse (StringInputSource (testdoc ), formal = 'xml' )
312
311
@@ -317,13 +316,13 @@ def testStoreLiteralsXml(self):
317
316
self .assertEquals (o [1 ], says )
318
317
self .assertTrue (o [2 ] in objects )
319
318
320
-
321
319
def testStoreLiteralsXmlQuote (self ):
322
320
bob = self .bob
323
321
says = URIRef (u'http://www.rdflib.net/terms/says' )
324
322
imtheone = Literal (u'I\' m the one' , lang = 'en' )
325
323
326
- testdoc = (PY3 and bytes (xmltestdocXmlQuote ,"UTF-8" )) or xmltestdocXmlQuote
324
+ testdoc = (PY3 and bytes (xmltestdocXmlQuote , "UTF-8" )
325
+ ) or xmltestdocXmlQuote
327
326
328
327
self .graph .parse (StringInputSource (testdoc ), formal = 'xml' )
329
328
@@ -373,7 +372,6 @@ def testStoreLiteralsXmlQuote(self):
373
372
"""
374
373
375
374
376
-
377
375
n3testdoc = """@prefix : <http://example.org/> .
378
376
379
377
:a :b :c .
0 commit comments