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
def setup(self): install_rpyc_excepthook()