diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-03-31 08:33:50 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-03-31 08:33:50 (GMT) |
commit | fcc500ebc4a6d93a2d610666aa37ece2663b8e22 (patch) | |
tree | 0c550a69ba298c38995c2ebefaaff4af43c198e5 | |
parent | eb72991fbbb4af101b047fa380d61dc3934d5721 (diff) | |
download | cpython-fcc500ebc4a6d93a2d610666aa37ece2663b8e22.zip cpython-fcc500ebc4a6d93a2d610666aa37ece2663b8e22.tar.gz cpython-fcc500ebc4a6d93a2d610666aa37ece2663b8e22.tar.bz2 |
Silence a py3k warning.
-rw-r--r-- | Lib/test/test_inspect.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index a2913e8..23e1289 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -593,9 +593,12 @@ class TestGetcallargsFunctions(unittest.TestCase): def makeCallable(self, signature): """Create a function that returns its locals(), excluding the autogenerated '.1', '.2', etc. tuple param names (if any).""" - code = ("lambda %s: dict(i for i in locals().items() " - "if not is_tuplename(i[0]))") - return eval(code % signature, {'is_tuplename' : self.is_tuplename}) + with check_py3k_warnings( + ("tuple parameter unpacking has been removed", SyntaxWarning), + quiet=True): + code = ("lambda %s: dict(i for i in locals().items() " + "if not is_tuplename(i[0]))") + return eval(code % signature, {'is_tuplename' : self.is_tuplename}) def test_plain(self): f = self.makeCallable('a, b=1') |