Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelm committed Jan 26, 2024
1 parent 8163be7 commit 447a8a8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_files.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import os
from cutadapt.files import ProxyTextFile


def test_proxy_test_file():
newline = os.linesep.encode()
pf = ProxyTextFile()
print("hello", file=pf)
assert pf.drain() == b"hello\n"
assert pf.drain() == b"hello" + newline
assert pf.drain() == b""

print("world", file=pf)
print("foo", file=pf)
assert pf.drain() == b"world\nfoo\n"
print("world", file=pf, end="\n")
print("foo", file=pf, end="\n")
assert pf.drain() == b"world" + newline + b"foo" + newline


def test_proxy_test_file_pickleable():
Expand Down

0 comments on commit 447a8a8

Please sign in to comment.