[Python-checkins] r78078 - python/trunk/Lib/test/test_functools.py
georg.brandl
python-checkins at python.org
Sun Feb 7 13:27:07 CET 2010
Author: georg.brandl
Date: Sun Feb 7 13:27:06 2010
New Revision: 78078
Log:
Fix a redefined test method.
Modified:
python/trunk/Lib/test/test_functools.py
Modified: python/trunk/Lib/test/test_functools.py
==============================================================================
--- python/trunk/Lib/test/test_functools.py (original)
+++ python/trunk/Lib/test/test_functools.py Sun Feb 7 13:27:06 2010
@@ -48,6 +48,14 @@
self.assertRaises(TypeError, setattr, p, 'args', (1, 2))
self.assertRaises(TypeError, setattr, p, 'keywords', dict(a=1, b=2))
+ p = self.thetype(hex)
+ try:
+ del p.__dict__
+ except TypeError:
+ pass
+ else:
+ self.fail('partial object allowed __dict__ to be deleted')
+
def test_argument_checking(self):
self.assertRaises(TypeError, self.thetype) # need at least a func arg
try:
@@ -122,15 +130,6 @@
self.assertRaises(ZeroDivisionError, self.thetype(f), 1, 0)
self.assertRaises(ZeroDivisionError, self.thetype(f, y=0), 1)
- def test_attributes(self):
- p = self.thetype(hex)
- try:
- del p.__dict__
- except TypeError:
- pass
- else:
- self.fail('partial object allowed __dict__ to be deleted')
-
def test_weakref(self):
f = self.thetype(int, base=16)
p = proxy(f)
More information about the Python-checkins
mailing list