You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
318 B

  1. import unittest
  2. import pexpect
  3. import signal
  4. class TestInteraction(unittest.TestCase):
  5. def test_keyboard_interrupt(self):
  6. p = pexpect.spawn("python3 lesspass/core.py --prompt")
  7. p.expect("Site: ")
  8. p.kill(signal.SIGINT)
  9. p.expect(pexpect.EOF)
  10. self.assertEqual(p.before, b"")