(self)
| 59 | s.close() |
| 60 | |
| 61 | def test_fileobj(self): |
| 62 | f = open('TESTDATA.txt', 'r') |
| 63 | s = fdpexpect.fdspawn(f) # Should get the fileno from the file handle |
| 64 | s.expect('2') |
| 65 | s.close() |
| 66 | assert not s.isalive() |
| 67 | s.close() # Smoketest - should be able to call this again |
| 68 | |
| 69 | if __name__ == '__main__': |
| 70 | unittest.main() |