summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-02-07 12:27:06 (GMT)
committerGeorg Brandl <georg@python.org>2010-02-07 12:27:06 (GMT)
commita34f87f98120bb470136f3be212c67d5ef981379 (patch)
tree310a5da4e6d99d443064a546ad873d97af17419a
parent41dc63fae5de14689ac40cfd91a8a38fc07e3748 (diff)
downloadcpython-a34f87f98120bb470136f3be212c67d5ef981379.zip
cpython-a34f87f98120bb470136f3be212c67d5ef981379.tar.gz
cpython-a34f87f98120bb470136f3be212c67d5ef981379.tar.bz2
Fix a redefined test method.
-rw-r--r--Lib/test/test_functools.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index aa672ab..b88e9b7 100644
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -48,6 +48,14 @@ class TestPartial(unittest.TestCase):
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 @@ class TestPartial(unittest.TestCase):
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)