summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_logging.py4
-rw-r--r--Lib/test/test_weakref.py8
2 files changed, 10 insertions, 2 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 75d1366..c99a650 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -615,10 +615,10 @@ class ConfigFileTest(BaseTest):
args=(sys.stdout,)
[handler_hand2]
- class=FileHandler
+ class=StreamHandler
level=NOTSET
formatter=form1
- args=('test.blah', 'a')
+ args=(sys.stderr,)
[formatter_form1]
format=%(levelname)s ++ %(message)s
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index 108cd7f..9821e1b 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -660,6 +660,14 @@ class ReferencesTestCase(TestBase):
w = Target()
+ def test_init(self):
+ # Issue 3634
+ # <weakref to class>.__init__() doesn't check errors correctly
+ r = weakref.ref(Exception)
+ self.assertRaises(TypeError, r.__init__, 0, 0, 0, 0, 0)
+ # No exception should be raised here
+ gc.collect()
+
class SubclassableWeakrefTestCase(TestBase):