(self)
| 1601 | self.assertEqual(len(stdout), 5) |
| 1602 | |
| 1603 | def test_stdout_callback_line_unbuffered(self): |
| 1604 | py = create_tmp_test( |
| 1605 | """ |
| 1606 | import sys |
| 1607 | import os |
| 1608 | |
| 1609 | for i in range(5): print("herpderp") |
| 1610 | """ |
| 1611 | ) |
| 1612 | |
| 1613 | stdout = [] |
| 1614 | |
| 1615 | def agg(char): |
| 1616 | stdout.append(char) |
| 1617 | |
| 1618 | p = python("-u", py.name, _out=agg, _out_bufsize=0) |
| 1619 | p.wait() |
| 1620 | |
| 1621 | # + 5 newlines |
| 1622 | self.assertEqual(len(stdout), len("herpderp") * 5 + 5) |
| 1623 | |
| 1624 | def test_stdout_callback_buffered(self): |
| 1625 | py = create_tmp_test( |
nothing calls this directly
no test coverage detected