(self)
| 85 | self.assertEqual(p.after, b'.?') |
| 86 | |
| 87 | def test_expect_eof(self): |
| 88 | the_old_way = subprocess.Popen(args=['ls', '-l', '/bin'], |
| 89 | stdout=subprocess.PIPE).communicate()[0].rstrip() |
| 90 | p = PopenSpawn('ls -l /bin') |
| 91 | # This basically tells it to read everything. Same as pexpect.run() |
| 92 | # function. |
| 93 | p.expect(pexpect.EOF) |
| 94 | the_new_way = p.before.rstrip() |
| 95 | assert the_old_way == the_new_way, len(the_old_way) - len(the_new_way) |
| 96 | |
| 97 | def test_expect_timeout(self): |
| 98 | p = PopenSpawn('cat', timeout=5) |
nothing calls this directly
no test coverage detected