(tmp_path)
| 30 | |
| 31 | |
| 32 | def test_tcp(tmp_path): |
| 33 | sa = save.Save() |
| 34 | with taddons.context(sa) as tctx: |
| 35 | p = str(tmp_path / "foo") |
| 36 | tctx.configure(sa, save_stream_file=p) |
| 37 | |
| 38 | tt = tflow.ttcpflow() |
| 39 | sa.tcp_start(tt) |
| 40 | sa.tcp_end(tt) |
| 41 | |
| 42 | tt = tflow.ttcpflow() |
| 43 | sa.tcp_start(tt) |
| 44 | sa.tcp_error(tt) |
| 45 | |
| 46 | tctx.configure(sa, save_stream_file=None) |
| 47 | assert len(rd(p)) == 2 |
| 48 | |
| 49 | |
| 50 | def test_udp(tmp_path): |