Skip to content

Commit 139d907

Browse files
committed
fix tests broken by taking lint advice
1 parent efaa7e1 commit 139d907

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/searchcommands/chunked_data_stream.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ def __init__(self, stream):
4242
def read_chunk(self):
4343
header = self.stream.readline()
4444

45-
while header > 0 and header.strip() == b'':
45+
while len(header) > 0 and header.strip() == b'':
4646
header = self.stream.readline() # Skip empty lines
47-
48-
if not header == 0:
47+
if len(header) == 0:
4948
raise EOFError
49+
5050
version, meta, data = header.rstrip().split(b',')
5151
metabytes = self.stream.read(int(meta))
5252
databytes = self.stream.read(int(data))

tests/searchcommands/test_generator_command.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ def generate(self):
3434
finished_seen = chunk.meta.get("finished", False)
3535
for row in chunk.data:
3636
seen.add(row["event_index"])
37+
print(out_stream.getvalue())
38+
print(expected)
39+
print(seen)
3740
assert expected.issubset(seen)
3841
assert finished_seen
3942

0 commit comments

Comments
 (0)