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 1a2009c..8a95f6d 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):
@@ -142,6 +143,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))
@@ -159,6 +163,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: