From: <fwi...@us...> - 2008-10-16 14:26:34
|
Revision: 5424 http://jython.svn.sourceforge.net/jython/?rev=5424&view=rev Author: fwierzbicki Date: 2008-10-16 14:26:23 +0000 (Thu, 16 Oct 2008) Log Message: ----------- Moved test108 to test_dict_jy Modified Paths: -------------- trunk/jython/Lib/test/test_dict_jy.py Removed Paths: ------------- trunk/jython/bugtests/test108.py Modified: trunk/jython/Lib/test/test_dict_jy.py =================================================================== --- trunk/jython/Lib/test/test_dict_jy.py 2008-10-16 12:42:06 UTC (rev 5423) +++ trunk/jython/Lib/test/test_dict_jy.py 2008-10-16 14:26:23 UTC (rev 5424) @@ -23,6 +23,21 @@ s[7] = 'called' self.assertEquals('called', s.createdInInit) + def testUnhashableKeys(self): + try: + a = {1:2} + except TypeError: + pass + else: + self.fail("list as dict key should raise TypeError") + + try: + a = {{1:2}:3} + except TypeError: + pass + else: + self.fail("dict as dict key should raise TypeError") + class DictCmpTest(unittest.TestCase): "Test for http://bugs.jython.org/issue1031" def testDictCmp(self): Deleted: trunk/jython/bugtests/test108.py =================================================================== --- trunk/jython/bugtests/test108.py 2008-10-16 12:42:06 UTC (rev 5423) +++ trunk/jython/bugtests/test108.py 2008-10-16 14:26:23 UTC (rev 5424) @@ -1,13 +0,0 @@ -""" -Check for lists and dicts as key in a dict. -""" - -import support - -try: - a = {[1]:2} - a = {{1:2}:3} -except TypeError, e: - pass -else: - raise support.TestError("Should fail, lists and dicts not allowed as key") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |