Esempio n. 1
0
    def test_quit_on_eof(self):
        def f():
            raise EOFError

        with self.assertRaises(SystemExit):
            with cli.exec_ctx():
                f()
Esempio n. 2
0
    def test_quit_on_eof(self):
        def f():
            raise EOFError

        with self.assertRaises(SystemExit):
            with cli.exec_ctx():
                f()
Esempio n. 3
0
 def test_ignore_aborted(self):
     def f():
         raise errors.Aborted()
     with cli.exec_ctx():
         f()
Esempio n. 4
0
 def test_ignore_keyboard_interrupt(self):
     def f():
         raise KeyboardInterrupt
     with cli.exec_ctx():
         f()
Esempio n. 5
0
    def test_ignore_aborted(self):
        def f():
            raise errors.Aborted()

        with cli.exec_ctx():
            f()
Esempio n. 6
0
    def test_ignore_keyboard_interrupt(self):
        def f():
            raise KeyboardInterrupt

        with cli.exec_ctx():
            f()