diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-18 08:35:40 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-18 08:35:40 (GMT) |
commit | 43beaebffb55e0b9250d996fd7a10f6e575f34e0 (patch) | |
tree | 473b5cf8560700acf12c95512a9c16ca0d757cdd /Lib/test/test_urllib2.py | |
parent | 5e90cd9b32b1fdd1779d6cbd19530fffe26683ff (diff) | |
download | cpython-43beaebffb55e0b9250d996fd7a10f6e575f34e0.zip cpython-43beaebffb55e0b9250d996fd7a10f6e575f34e0.tar.gz cpython-43beaebffb55e0b9250d996fd7a10f6e575f34e0.tar.bz2 |
Issue #6500: Fixed infinite recursion in urllib2.Request.__getattr__().
Diffstat (limited to 'Lib/test/test_urllib2.py')
-rw-r--r-- | Lib/test/test_urllib2.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 32ffd0a..5a631b3 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1350,6 +1350,11 @@ class RequestTests(unittest.TestCase): req = Request(url) self.assertEqual(req.get_full_url(), url) + def test_private_attributes(self): + self.assertFalse(hasattr(self.get, '_Request__r_xxx')) + # Issue #6500: infinite recursion + self.assertFalse(hasattr(self.get, '_Request__r_method')) + def test_HTTPError_interface(self): """ Issue 13211 reveals that HTTPError didn't implement the URLError |