aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_dump.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/test_dump.py b/test/test_dump.py
index e9cb4d33..aa91d262 100644
--- a/test/test_dump.py
+++ b/test/test_dump.py
@@ -143,9 +143,16 @@ class TestDumpMaster:
def test_write(self):
with tutils.tmpdir() as d:
p = os.path.join(d, "a")
- self._dummy_cycle(1, None, "", wfile=p, verbosity=0)
+ self._dummy_cycle(1, None, "", outfile=(p,"wb"), verbosity=0)
assert len(list(flow.FlowReader(open(p,"rb")).stream())) == 1
+ def test_write_append(self):
+ with tutils.tmpdir() as d:
+ p = os.path.join(d, "a.append")
+ self._dummy_cycle(1, None, "", outfile=(p,"wb"), verbosity=0)
+ self._dummy_cycle(1, None, "", outfile=(p,"ab"), verbosity=0)
+ assert len(list(flow.FlowReader(open(p,"rb")).stream())) == 2
+
def test_write_err(self):
tutils.raises(
dump.DumpError,
@@ -153,7 +160,7 @@ class TestDumpMaster:
1,
None,
"",
- wfile = "nonexistentdir/foo"
+ outfile = ("nonexistentdir/foo", "wb")
)
def test_script(self):