struct.pack has become picky about h (short) and H (unsigned short).
[python/dscho.git] / Lib / dos-8x3 / test_ate.py
blob517610b235b4e0393957b1023feec8272c53249e
1 # Test the exit module
2 from test_support import verbose
3 import atexit
5 def handler1():
6 print "handler1"
8 def handler2(*args, **kargs):
9 print "handler2", args, kargs
11 # save any exit functions that may have been registered as part of the
12 # test framework
13 _exithandlers = atexit._exithandlers
14 atexit._exithandlers = []
16 atexit.register(handler1)
17 atexit.register(handler2)
18 atexit.register(handler2, 7, kw="abc")
20 # simulate exit behavior by calling atexit._run_exitfuncs directly...
21 atexit._run_exitfuncs()
23 # restore exit handlers
24 atexit._exithandlers = _exithandlers