summaryrefslogtreecommitdiffstats
path: root/Lib/dos-8x3/test_opc.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-10-06 20:19:59 (GMT)
committerGuido van Rossum <guido@python.org>1997-10-06 20:19:59 (GMT)
commita11ccccd249c201df0224c84bbaacdb31496aa5b (patch)
treed5a3ed51586cbe829775209fa49f469935332782 /Lib/dos-8x3/test_opc.py
parentd57548023fa61918e545c0c808625df4f43e6ad4 (diff)
downloadcpython-a11ccccd249c201df0224c84bbaacdb31496aa5b.zip
cpython-a11ccccd249c201df0224c84bbaacdb31496aa5b.tar.gz
cpython-a11ccccd249c201df0224c84bbaacdb31496aa5b.tar.bz2
The usual (and some new modules).
Diffstat (limited to 'Lib/dos-8x3/test_opc.py')
-rwxr-xr-xLib/dos-8x3/test_opc.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/Lib/dos-8x3/test_opc.py b/Lib/dos-8x3/test_opc.py
index 656e00a..15c9dda 100755
--- a/Lib/dos-8x3/test_opc.py
+++ b/Lib/dos-8x3/test_opc.py
@@ -28,6 +28,9 @@ print '2.2 raise class exceptions'
class AClass: pass
class BClass(AClass): pass
class CClass: pass
+class DClass(AClass):
+ def __init__(self, ignore):
+ pass
try: raise AClass()
except: pass
@@ -46,18 +49,22 @@ a = AClass()
b = BClass()
try: raise AClass, b
-except BClass, v: raise TestFailed
-except AClass, v:
+except BClass, v:
if v != b: raise TestFailed
-
+else: raise TestFailed
try: raise b
except AClass, v:
if v != b: raise TestFailed
+# not enough arguments
try: raise BClass, a
except TypeError: pass
+try: raise DClass, a
+except DClass, v:
+ if not isinstance(v, DClass):
+ raise TestFailed
print '2.3 comparing function objects'