Пример #1
0
def test_install_and_un_hook():
    orginal_hook = sys.excepthook
    install_rpyc_excepthook()
    new_hook = sys.excepthook

    print("orginal_hook:", orginal_hook)
    print("new_hook:", new_hook)

    assert new_hook != orginal_hook
    assert new_hook == rpyc_excepthook

    uninstall_rpyc_excepthook()

    restored_hook = sys.excepthook

    print("restored_hook:", restored_hook)

    assert restored_hook == orginal_hook
Пример #2
0
def test_install_and_un_hook():
    orginal_hook = sys.excepthook
    install_rpyc_excepthook()
    new_hook = sys.excepthook

    print("orginal_hook:", orginal_hook)
    print("new_hook:", new_hook)

    assert new_hook != orginal_hook
    assert new_hook == rpyc_excepthook

    uninstall_rpyc_excepthook()

    restored_hook = sys.excepthook

    print("restored_hook:", restored_hook)

    assert restored_hook == orginal_hook
Пример #3
0
 def setup(self):
     install_rpyc_excepthook()
Пример #4
0
 def setup(self):
     install_rpyc_excepthook()