Skip to content

Commit 00bfa67

Browse files
committed
fix flake8-print issues
1 parent 71be4b5 commit 00bfa67

File tree

3 files changed

+1
-38
lines changed

3 files changed

+1
-38
lines changed

test/context_case.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ def testConjunction(self):
9999
# add to context 1
100100
graph = Graph(self.graph.store, self.c1)
101101
graph.add(triple)
102-
# print("Graph", graph.identifier, graph.serialize(format="nt"))
103-
# print("Selfgraph", self.graph.identifier,
104-
# self.graph.serialize(format="nt"))
105102
self.assertEquals(len(self.graph.store), len(graph.store))
106103

107104
def testAdd(self):
@@ -130,17 +127,9 @@ def testLenInOneContext(self):
130127

131128
def testLenInMultipleContexts(self):
132129
oldLen = len(self.graph.store)
133-
print("Original", oldLen, self.graph.store)
134130
self.addStuffInMultipleContexts()
135-
newLen = len(self.graph.store)
136-
print("MultipleContexts", newLen, self.graph.store)
137131
# addStuffInMultipleContexts is adding the same triple to
138132
# three different contexts. So it's only + 1
139-
print("No context", len(list(self.graph.triples((None, None, None)))))
140-
print("Context context-1", len(
141-
list(self.graph.triples((None, None, None), context=self.c1))))
142-
print("Context context-2", len(
143-
list(self.graph.triples((None, None, None), context=self.c2))))
144133
self.assertEquals(len(self.graph.store), oldLen + 1,
145134
[self.graph.store, oldLen + 1])
146135

test/test.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,44 +28,21 @@ def investigate_len_issue():
2828
"here": os.getcwd()}))
2929
g0 = Graph("Sleepycat")
3030
g0.open("/tmp/foo", create=True)
31-
print("Len g0 on opening: %s\n" % len(g0))
3231
g1 = Graph(store)
33-
print("Len g1 on opening: %s\n" % len(g1))
3432
statementId = BNode()
35-
print("Adding %s\n\t%s\n\t%s\n" % (statementId, RDF.type, RDF.Statement))
3633
g0.add((statementId, RDF.type, RDF.Statement))
3734
g1.add((statementId, RDF.type, RDF.Statement))
38-
print("Adding %s\n\t%s\n\t%s\n" % (statementId, RDF.subject,
39-
URIRef(u"http://rdflib.net/store/ConjunctiveGraph")))
4035
g0.add((statementId, RDF.subject,
4136
URIRef(u"http://rdflib.net/store/ConjunctiveGraph")))
4237
g1.add((statementId, RDF.subject,
4338
URIRef(u"http://rdflib.net/store/ConjunctiveGraph")))
44-
print("Adding %s\n\t%s\n\t%s\n" % (statementId, RDF.predicate, RDFS.label))
4539
g0.add((statementId, RDF.predicate, RDFS.label))
4640
g1.add((statementId, RDF.predicate, RDFS.label))
47-
print("Adding %s\n\t%s\n\t%s\n" % (
48-
statementId, RDF.object, Literal("Conjunctive Graph")))
4941
g0.add((statementId, RDF.object, Literal("Conjunctive Graph")))
50-
print("Len g0 after adding 4 triples %s\n" % len(g0))
5142
g1.add((statementId, RDF.object, Literal("Conjunctive Graph")))
52-
print("Len g1 after adding 4 triples %s\n" % len(g1))
53-
print(g0.serialize(format="nt") + "\n")
54-
for s, p, o in g0:
55-
print("s = %s\n\tp = %s\n\to = %s\n" % (
56-
repr(s), repr(p), repr(o)))
57-
print(g1.serialize(format="nt") + "\n")
58-
for s, p, o in g1:
59-
print("s = %s\n\tp = %s\n\to = %s\n" % (
60-
repr(s), repr(p), repr(o)))
6143
getoutput("cp development.sqlite devcopy.sqlite")
62-
print("Removing %s\n\t%s\n\t%s\n" % (statementId, RDF.type, RDF.Statement))
6344
g0.remove((statementId, RDF.type, RDF.Statement))
64-
print("Len g0 after removal %s\n" % len(g0))
6545
g1.remove((statementId, RDF.type, RDF.Statement))
66-
print("Len g1 after removal %s\n" % len(g1))
67-
print(g0.serialize(format="nt") + "\n")
68-
print(g1.serialize(format="nt") + "\n")
6946
g0.close()
7047
shutil.rmtree("/tmp/foo")
7148
g1.close()

test/test_store_performance.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,11 @@ def tearDown(self):
6767
def testTime(self):
6868
"""Test timing."""
6969
# number = 1
70-
print("'%s': [" % self.store)
7170
for i in ["500triples", "1ktriples", "2ktriples",
7271
"3ktriples", "5ktriples", "10ktriples",
7372
"25ktriples"]:
7473
inputloc = os.getcwd() + "/test/sp2b/%s.n3" % i
75-
res = self._testInput(inputloc)
76-
print("%s," % res.strip())
77-
print("],")
74+
self._testInput(inputloc)
7875

7976
def _testInput(self, inputloc):
8077
number = 1

0 commit comments

Comments
 (0)