This tests that echo may be toggled off.
(self)
| 38 | p.expect_exact (pexpect.EOF) |
| 39 | |
| 40 | def test_expect_setecho_toggle(self): |
| 41 | '''This tests that echo may be toggled off. |
| 42 | ''' |
| 43 | p = pexpect.spawnu('cat', timeout=5) |
| 44 | try: |
| 45 | self._expect_echo_toggle_off(p) |
| 46 | except IOError: |
| 47 | if sys.platform.lower().startswith('sunos'): |
| 48 | if hasattr(unittest, 'SkipTest'): |
| 49 | raise unittest.SkipTest("Not supported on this platform.") |
| 50 | return 'skip' |
| 51 | raise |
| 52 | self._expect_echo_toggle_on(p) |
| 53 | |
| 54 | def test_expect_echo_exact (self): |
| 55 | '''Like test_expect_echo(), but using expect_exact(). |
nothing calls this directly
no test coverage detected