From: Ezio Melotti Date: Tue, 3 Aug 2010 08:28:31 +0000 (+0000) Subject: Fix deprecation warnings in test_cgi.py X-Git-Tag: v2.6.6rc1~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a078d5b4c274e9c1e6d336753383bdd1ff7608e;p=thirdparty%2FPython%2Fcpython.git Fix deprecation warnings in test_cgi.py --- diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py index 0144b972ccb4..b723d7432383 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -1,4 +1,4 @@ -from test.test_support import run_unittest, check_warnings +from test.test_support import run_unittest, check_warnings, _check_py3k_warnings import cgi import os import sys @@ -179,7 +179,8 @@ class CgiTests(unittest.TestCase): self.assertEqual(d[k], v) for k, v in d.items(): self.assertEqual(expect[k], v) - self.assertEqual(sorted(expect.values()), sorted(d.values())) + with _check_py3k_warnings(): + self.assertEqual(sorted(expect.values()), sorted(d.values())) def test_log(self): cgi.log("Testing")