mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
The usual (and some new modules).
This commit is contained in:
parent
d57548023f
commit
a11ccccd24
17 changed files with 1011 additions and 285 deletions
|
@ -1,11 +1,16 @@
|
|||
# Python test set -- part 5, built-in exceptions
|
||||
|
||||
from test_support import *
|
||||
from types import ClassType
|
||||
|
||||
print '5. Built-in exceptions'
|
||||
# XXX This is not really enough, each *operation* should be tested!
|
||||
|
||||
def r(name): print name
|
||||
def r(thing):
|
||||
if type(thing) == ClassType:
|
||||
print thing.__name__
|
||||
else:
|
||||
print thing
|
||||
|
||||
r(AttributeError)
|
||||
import sys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue