(rep)
| 132 | |
| 133 | @repetitions |
| 134 | def test_flush(rep): |
| 135 | flushed = [] |
| 136 | out = [] |
| 137 | |
| 138 | class A: |
| 139 | def write(self, m): |
| 140 | out.append(m) |
| 141 | |
| 142 | def flush(self): |
| 143 | flushed.append(out[-1]) |
| 144 | |
| 145 | log(A(), rep) |
| 146 | assert flushed == [expected] * rep |
| 147 | |
| 148 | |
| 149 | def test_file_sink_ascii_encoding(tmp_path): |