[Jython-checkins] jython: _check_py3k_warnings -> check_py3kwarnings
frank.wierzbicki
jython-checkins at python.org
Wed Mar 21 18:15:17 CET 2012
http://hg.python.org/jython/rev/e50856ce8746
changeset: 6450:e50856ce8746
user: Frank Wierzbicki <fwierzbicki at gmail.com>
date: Wed Mar 21 10:15:00 2012 -0700
summary:
_check_py3k_warnings -> check_py3kwarnings
files:
Lib/test/test_class.py | 2 +-
Lib/test/test_compile.py | 2 +-
Lib/test/test_inspect.py | 6 +++---
Lib/test/test_iter.py | 6 +++---
Lib/test/test_operator.py | 2 +-
Lib/test/test_scope.py | 4 ++--
Lib/test/test_univnewlines.py | 2 +-
Lib/test/test_weakref.py | 4 ++--
8 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
--- a/Lib/test/test_class.py
+++ b/Lib/test/test_class.py
@@ -636,7 +636,7 @@
hash(a.f)
def test_main():
- with test_support._check_py3k_warnings(
+ with test_support.check_py3k_warnings(
(".+__(get|set|del)slice__ has been removed", DeprecationWarning),
("classic int division", DeprecationWarning),
("<> not supported", DeprecationWarning)):
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -138,7 +138,7 @@
def test_complex_args(self):
- with test_support._check_py3k_warnings(
+ with test_support.check_py3k_warnings(
("tuple parameter unpacking has been removed", SyntaxWarning)):
exec textwrap.dedent('''
def comp_args((a, b)):
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -4,9 +4,9 @@
import inspect
import datetime
-from test.test_support import is_jython, run_unittest, _check_py3k_warnings
+from test.test_support import is_jython, run_unittest, check_py3k_warnings
-with _check_py3k_warnings(
+with check_py3k_warnings(
("tuple parameter unpacking has been removed", SyntaxWarning),
quiet=True):
from test import inspect_fodder as mod
@@ -385,7 +385,7 @@
@na_for_jython
def test_getargspec_sublistofone(self):
- with _check_py3k_warnings(
+ with check_py3k_warnings(
("tuple parameter unpacking has been removed", SyntaxWarning),
("parenthesized argument names are invalid", SyntaxWarning)):
exec 'def sublistOfOne((foo,)): return 1'
diff --git a/Lib/test/test_iter.py b/Lib/test/test_iter.py
--- a/Lib/test/test_iter.py
+++ b/Lib/test/test_iter.py
@@ -2,7 +2,7 @@
import unittest
from test.test_support import run_unittest, TESTFN, unlink, have_unicode, \
- _check_py3k_warnings
+ check_py3k_warnings
# Test result of triple loop (too big to inline)
TRIPLETS = [(0, 0, 0), (0, 0, 1), (0, 0, 2),
@@ -401,7 +401,7 @@
for i in range(5)]
# Deprecated map(None, ...)
- with _check_py3k_warnings():
+ with check_py3k_warnings():
self.assertEqual(map(None, SequenceClass(5)), range(5))
self.assertEqual(map(None, d), d.keys())
self.assertEqual(map(None, d,
@@ -504,7 +504,7 @@
# Test reduces()'s use of iterators.
def test_deprecated_builtin_reduce(self):
- with _check_py3k_warnings():
+ with check_py3k_warnings():
self._test_builtin_reduce()
def _test_builtin_reduce(self):
diff --git a/Lib/test/test_operator.py b/Lib/test/test_operator.py
--- a/Lib/test/test_operator.py
+++ b/Lib/test/test_operator.py
@@ -195,7 +195,7 @@
pass
def check(self, o, v):
self.assertEqual(operator.isCallable(o), v)
- with test_support._check_py3k_warnings():
+ with test_support.check_py3k_warnings():
self.assertEqual(callable(o), v)
check(self, 4, 0)
check(self, operator.isCallable, 1)
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -1,5 +1,5 @@
import unittest
-from test.test_support import (check_syntax_error, _check_py3k_warnings,
+from test.test_support import (check_syntax_error, check_py3k_warnings,
check_warnings, is_jython, run_unittest)
@@ -330,7 +330,7 @@
self.assertEqual(makeReturner2(a=11)()['a'], 11)
- with _check_py3k_warnings(("tuple parameter unpacking has been removed",
+ with check_py3k_warnings(("tuple parameter unpacking has been removed",
SyntaxWarning)):
exec """\
def makeAddPair((a, b)):
diff --git a/Lib/test/test_univnewlines.py b/Lib/test/test_univnewlines.py
--- a/Lib/test/test_univnewlines.py
+++ b/Lib/test/test_univnewlines.py
@@ -82,7 +82,7 @@
def test_execfile(self):
namespace = {}
- with test_support._check_py3k_warnings():
+ with test_support.check_py3k_warnings():
execfile(test_support.TESTFN, namespace)
func = namespace['line3']
self.assertEqual(func.func_code.co_firstlineno, 3)
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -192,7 +192,7 @@
p.append(12)
self.assertEqual(len(L), 1)
self.failUnless(p, "proxy for non-empty UserList should be true")
- with test_support._check_py3k_warnings():
+ with test_support.check_py3k_warnings():
p[:] = [2, 3]
self.assertEqual(len(L), 2)
self.assertEqual(len(p), 2)
@@ -207,7 +207,7 @@
## self.assertEqual(repr(L2), repr(p2))
L3 = UserList.UserList(range(10))
p3 = weakref.proxy(L3)
- with test_support._check_py3k_warnings():
+ with test_support.check_py3k_warnings():
self.assertEqual(L3[:], p3[:])
self.assertEqual(L3[5:], p3[5:])
self.assertEqual(L3[:5], p3[:5])
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list