(self)
| 1642 | self.assertEqual(len(stdout), len("herp") / 2 * 5) |
| 1643 | |
| 1644 | def test_stdout_callback_with_input(self): |
| 1645 | py = create_tmp_test( |
| 1646 | """ |
| 1647 | import sys |
| 1648 | import os |
| 1649 | |
| 1650 | for i in range(5): print(str(i)) |
| 1651 | derp = input("herp? ") |
| 1652 | print(derp) |
| 1653 | """ |
| 1654 | ) |
| 1655 | |
| 1656 | def agg(line, stdin): |
| 1657 | if line.strip() == "4": |
| 1658 | stdin.put("derp\n") |
| 1659 | |
| 1660 | p = python("-u", py.name, _out=agg, _tee=True) |
| 1661 | p.wait() |
| 1662 | |
| 1663 | self.assertIn("derp", p) |
| 1664 | |
| 1665 | def test_stdout_callback_exit(self): |
| 1666 | py = create_tmp_test( |
nothing calls this directly
no test coverage detected