diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-08-03 04:08:59 +0000 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-08-03 04:08:59 +0000 |
commit | d24b5d8fc786ba0532aebf24db21ed097446514f (patch) | |
tree | 2486431a7b0622a0e54195b26ef4a1ddb773f662 /Lib/test/test_compile.py | |
parent | 620f5c91d78f2b8d5600e838ec3a33f109b89bb3 (diff) | |
download | cpython-git-d24b5d8fc786ba0532aebf24db21ed097446514f.tar.gz |
Merged revisions 79187-79189 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79187 | florent.xicluna | 2010-03-21 12:50:44 +0200 (Sun, 21 Mar 2010) | 2 lines
Silence more py3k warnings in unittest.case.
........
r79188 | florent.xicluna | 2010-03-21 12:51:40 +0200 (Sun, 21 Mar 2010) | 2 lines
Fix py3k warnings in test_decimal, using unittest.assertItemsEqual.
........
r79189 | florent.xicluna | 2010-03-21 13:03:21 +0200 (Sun, 21 Mar 2010) | 2 lines
Silence some py3k SyntaxWarning using check_py3k_warnings() with "exec" statements.
........
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r-- | Lib/test/test_compile.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 78215d2b63..b3111dd60c 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -2,6 +2,7 @@ import unittest import sys import _ast from test import test_support +import textwrap class TestSpecifics(unittest.TestCase): @@ -129,6 +130,9 @@ def f(x): def test_complex_args(self): + with test_support._check_py3k_warnings( + ("tuple parameter unpacking has been removed", SyntaxWarning)): + exec textwrap.dedent(''' def comp_args((a, b)): return a,b self.assertEqual(comp_args((1, 2)), (1, 2)) @@ -146,6 +150,7 @@ def f(x): return a, b, c self.assertEqual(comp_args(1, (2, 3)), (1, 2, 3)) self.assertEqual(comp_args(), (2, 3, 4)) + ''') def test_argument_order(self): try: |