diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-08-08 05:43:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 05:43:18 (GMT) |
commit | 7d44e7a4563072d0fad00427b76b94cad61c38ae (patch) | |
tree | 3c5244b17e90529d6f10c8c54bfadf4caa31cb38 /Lib/test/test_urllib2.py | |
parent | 662db125cddbca1db68116c547c290eb3943d98e (diff) | |
download | cpython-7d44e7a4563072d0fad00427b76b94cad61c38ae.zip cpython-7d44e7a4563072d0fad00427b76b94cad61c38ae.tar.gz cpython-7d44e7a4563072d0fad00427b76b94cad61c38ae.tar.bz2 |
bpo-37685: Use singletons ALWAYS_EQ and NEVER_EQ in more tests. (GH-15167)
Diffstat (limited to 'Lib/test/test_urllib2.py')
-rw-r--r-- | Lib/test/test_urllib2.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index debb3c2..7b576db 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -634,17 +634,12 @@ class OpenerDirectorTests(unittest.TestCase): [("http_error_302")], ] handlers = add_ordered_mock_handlers(o, meth_spec) - - class Unknown: - def __eq__(self, other): - return True - req = Request("http://example.com/") o.open(req) assert len(o.calls) == 2 calls = [(handlers[0], "http_open", (req,)), (handlers[2], "http_error_302", - (req, Unknown(), 302, "", {}))] + (req, support.ALWAYS_EQ, 302, "", {}))] for expected, got in zip(calls, o.calls): handler, method_name, args = expected self.assertEqual((handler, method_name), got[:2]) |