Beispiel #1
0
    def test_quit_on_eof(self):
        def f():
            raise EOFError

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

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

        with cli.exec_ctx():
            f()
Beispiel #6
0
    def test_ignore_keyboard_interrupt(self):
        def f():
            raise KeyboardInterrupt

        with cli.exec_ctx():
            f()