Skip to content

Commit

Permalink
fix string types for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
drewp committed Apr 1, 2015
1 parent bd57db7 commit b93f3dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_trig.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def testRememberNamespace(self):
# prefix for the graph but later serialize() calls would work.
first_out = g.serialize(format='trig')
second_out = g.serialize(format='trig')
self.assertIn('@prefix ns1: <http://example.com/> .', second_out)
self.assertIn('@prefix ns1: <http://example.com/> .', first_out)
self.assertIn(b'@prefix ns1: <http://example.com/> .', second_out)
self.assertIn(b'@prefix ns1: <http://example.com/> .', first_out)

print first_out

Expand All @@ -69,7 +69,7 @@ def testGraphQnameSyntax(self):
rdflib.Literal("example 1"),
rdflib.URIRef("http://example.com/graph1")))
out = g.serialize(format='trig')
self.assertIn('ns1:graph1 {', out)
self.assertIn(b'ns1:graph1 {', out)

def testGraphUriSyntax(self):
g = rdflib.ConjunctiveGraph()
Expand All @@ -80,4 +80,4 @@ def testGraphUriSyntax(self):
# out as a '<...>' term.
rdflib.URIRef("http://example.com/foo.")))
out = g.serialize(format='trig')
self.assertIn('<http://example.com/foo.> {', out)
self.assertIn(b'<http://example.com/foo.> {', out)

0 comments on commit b93f3dd

Please sign in to comment.