[Python-checkins] CVS: python/dist/src/Lib/test test_b1.py,1.31,1.32
Guido van Rossum
gvanrossum@users.sourceforge.net
Thu, 18 Jan 2001 15:36:16 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv26561
Modified Files:
test_b1.py
Log Message:
Add test that ensures hash([]) and hash({}) raise TypeError.
Index: test_b1.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** test_b1.py 2001/01/04 22:33:02 1.31
--- test_b1.py 2001/01/18 23:36:14 1.32
***************
*** 268,271 ****
--- 268,277 ----
hash((0,1,2,3))
def f(): pass
+ try: hash([])
+ except TypeError: pass
+ else: raise TestFailed, "hash([]) should raise an exception"
+ try: hash({})
+ except TypeError: pass
+ else: raise TestFailed, "hash({}) should raise an exception"
print 'hex'