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.
........
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 78215d2..b3111dd 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -2,6 +2,7 @@
import sys
import _ast
from test import test_support
+import textwrap
class TestSpecifics(unittest.TestCase):
@@ -129,6 +130,9 @@
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 @@
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: