diff options
author | Guido van Rossum <guido@python.org> | 2003-02-27 20:14:51 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-02-27 20:14:51 +0000 |
commit | 68468eba635570400f607e140425a222018e56f9 (patch) | |
tree | 2176c8822392383a88caa0a2209a1d2f3446d45c /Lib/test/test_struct.py | |
parent | f389c7727362321a91dbaff13b7e1cef6cbaa3d8 (diff) | |
download | cpython-git-68468eba635570400f607e140425a222018e56f9.tar.gz |
Get rid of many apply() calls.
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r-- | Lib/test/test_struct.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index b9895d458e..bc0ace8525 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -1,6 +1,5 @@ from test.test_support import TestFailed, verbose, verify import struct -## import pdb import sys ISBIGENDIAN = sys.byteorder == "big" @@ -21,23 +20,21 @@ def bigendian_to_native(value): def simple_err(func, *args): try: - apply(func, args) + func(*args) except struct.error: pass else: raise TestFailed, "%s%s did not raise struct.error" % ( func.__name__, args) -## pdb.set_trace() def any_err(func, *args): try: - apply(func, args) + func(*args) except (struct.error, OverflowError, TypeError): pass else: raise TestFailed, "%s%s did not raise error" % ( func.__name__, args) -## pdb.set_trace() simple_err(struct.calcsize, 'Z') |