mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
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. ........
This commit is contained in:
parent
620f5c91d7
commit
d24b5d8fc7
3 changed files with 56 additions and 19 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue