Skip to content

Commit

Permalink
make test robust to windows linesep
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Jul 20, 2015
1 parent 3566fad commit 144de96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dask/bag/tests/test_bag.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,12 @@ def test_from_filenames_bz2():

def test_from_filenames_large():
with tmpfile() as fn:
with open(fn, 'w') as f:
f.write(('Hello, world!' + os.linesep) * 100)
with open(fn, 'wb') as f:
f.write(('Hello, world!' + os.linesep).encode() * 100)
b = db.from_filenames(fn, chunkbytes=100)
c = db.from_filenames(fn)
assert len(b.dask) > 5
assert list(b) == list(c)
assert list(map(str, b)) == list(map(str, c))

d = db.from_filenames([fn], chunkbytes=100)
assert list(b) == list(d)
Expand Down

0 comments on commit 144de96

Please sign in to comment.