Skip to content

Commit c32042f

Browse files
committed
Re-apply change of "assertIsNone" to "assertEquals" to satisfy Py 2 support req't.
1 parent 3ef8559 commit c32042f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/graph_case.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,19 +285,18 @@ def testStoreLiterals(self):
285285
self.graph.add((bob, says, something))
286286
self.graph.commit()
287287

288-
289288
objs = list(self.graph.objects(subject=bob, predicate=says))
290289
for o in objs:
291290
if o.value == u'hello':
292291
self.assertEquals(o.language, 'en')
293292
elif o.value == u'こんにちは':
294293
self.assertEquals(o.language, 'ja')
295294
elif o.value == u'something':
296-
self.assertIsNone(o.language)
295+
self.assertEquals(o.language, None)
297296
else:
298297
self.fail()
299298
self.assertEquals(len(list(objs)), 3)
300-
299+
301300
def testStoreLiteralsXml(self):
302301
bob = self.bob
303302
says = URIRef(u'http://www.rdflib.net/terms/says')
@@ -306,7 +305,7 @@ def testStoreLiteralsXml(self):
306305
Literal(u'こんにちは', lang='ja'),
307306
Literal(u'les garçons à Noël reçoivent des œufs', lang='fr')]
308307

309-
testdoc = (PY3 and bytes(xmltestdocXml,"UTF-8")) or xmltestdocXml
308+
testdoc = (PY3 and bytes(xmltestdocXml, "UTF-8")) or xmltestdocXml
310309

311310
self.graph.parse(StringInputSource(testdoc), formal='xml')
312311

@@ -317,13 +316,13 @@ def testStoreLiteralsXml(self):
317316
self.assertEquals(o[1], says)
318317
self.assertTrue(o[2] in objects)
319318

320-
321319
def testStoreLiteralsXmlQuote(self):
322320
bob = self.bob
323321
says = URIRef(u'http://www.rdflib.net/terms/says')
324322
imtheone = Literal(u'I\'m the one', lang='en')
325323

326-
testdoc = (PY3 and bytes(xmltestdocXmlQuote,"UTF-8")) or xmltestdocXmlQuote
324+
testdoc = (PY3 and bytes(xmltestdocXmlQuote, "UTF-8")
325+
) or xmltestdocXmlQuote
327326

328327
self.graph.parse(StringInputSource(testdoc), formal='xml')
329328

@@ -373,7 +372,6 @@ def testStoreLiteralsXmlQuote(self):
373372
"""
374373

375374

376-
377375
n3testdoc = """@prefix : <http://example.org/> .
378376
379377
:a :b :c .

0 commit comments

Comments
 (0)