]> granicus.if.org Git - python/commitdiff
Fix a redefined test method.
authorGeorg Brandl <georg@python.org>
Sun, 7 Feb 2010 12:27:06 +0000 (12:27 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 7 Feb 2010 12:27:06 +0000 (12:27 +0000)
Lib/test/test_functools.py

index aa672abe4f09d5308c0c768ac7a5f91df285c317..b88e9b7981a044c730996111fcaa0e2ad5dc27bd 100644 (file)
@@ -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)