[Python-checkins] python/dist/src/Lib/test autotest.py,1.11,1.12 test_doctest2.py,1.4,1.5 test_future.py,1.5,1.6 test_math.py,1.16,1.17 test_opcodes.py,1.11,1.12 test_pickle.py,1.10,1.11 test_re.py,1.32,1.33 test_sre.py,1.36,1.37 test_traceback.py,1.5,1.6 test_unpack.py,1.6,1.7

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
2002年7月30日 16:27:14 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv6654/Lib/test
Modified Files:
	autotest.py test_doctest2.py test_future.py test_math.py 
	test_opcodes.py test_pickle.py test_re.py test_sre.py 
	test_traceback.py test_unpack.py 
Log Message:
Complete the absolute import patch for the test suite. All relative
imports of test modules now import from the test package. Other
related oddities are also fixed (like DeprecationWarning filters that
weren't specifying the full import part, etc.). Also did a general
code cleanup to remove all "from test.test_support import *"'s. Other
from...import *'s weren't changed.
Index: autotest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/autotest.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** autotest.py	23 Aug 2000 05:28:45 -0000	1.11
--- autotest.py	30 Jul 2002 23:27:11 -0000	1.12
***************
*** 3,6 ****
 # from test import autotest.
 
! import regrtest
 regrtest.main()
--- 3,6 ----
 # from test import autotest.
 
! from test import regrtest
 regrtest.main()
Index: test_doctest2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_doctest2.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_doctest2.py	23 Jul 2002 19:03:50 -0000	1.4
--- test_doctest2.py	30 Jul 2002 23:27:11 -0000	1.5
***************
*** 94,98 ****
 
 def test_main():
! import test_doctest2
 EXPECTED = 19
 f, t = test_support.run_doctest(test_doctest2)
--- 94,98 ----
 
 def test_main():
! from test import test_doctest2
 EXPECTED = 19
 f, t = test_support.run_doctest(test_doctest2)
Index: test_future.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_future.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_future.py	23 Jul 2002 19:03:53 -0000	1.5
--- test_future.py	30 Jul 2002 23:27:11 -0000	1.6
***************
*** 13,47 ****
 
 unload('test_future1')
! import test_future1
 
 unload('test_future2')
! import test_future2
 
 unload('test_future3')
! import test_future3
 
 # The remaining tests should fail
 try:
! import badsyntax_future3
 except SyntaxError, msg:
 check_error_location(str(msg))
 
 try:
! import badsyntax_future4
 except SyntaxError, msg:
 check_error_location(str(msg))
 
 try:
! import badsyntax_future5
 except SyntaxError, msg:
 check_error_location(str(msg))
 
 try:
! import badsyntax_future6
 except SyntaxError, msg:
 check_error_location(str(msg))
 
 try:
! import badsyntax_future7
 except SyntaxError, msg:
 check_error_location(str(msg))
--- 13,47 ----
 
 unload('test_future1')
! from test import test_future1
 
 unload('test_future2')
! from test import test_future2
 
 unload('test_future3')
! from test import test_future3
 
 # The remaining tests should fail
 try:
! from test import badsyntax_future3
 except SyntaxError, msg:
 check_error_location(str(msg))
 
 try:
! from test import badsyntax_future4
 except SyntaxError, msg:
 check_error_location(str(msg))
 
 try:
! from test import badsyntax_future5
 except SyntaxError, msg:
 check_error_location(str(msg))
 
 try:
! from test import badsyntax_future6
 except SyntaxError, msg:
 check_error_location(str(msg))
 
 try:
! from test import badsyntax_future7
 except SyntaxError, msg:
 check_error_location(str(msg))
Index: test_math.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_math.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** test_math.py	23 Jul 2002 19:03:57 -0000	1.16
--- test_math.py	30 Jul 2002 23:27:11 -0000	1.17
***************
*** 2,6 ****
 # XXXX Should not do tests around zero only
 
! from test.test_support import *
 
 seps='1e-05'
--- 2,6 ----
 # XXXX Should not do tests around zero only
 
! from test.test_support import TestFailed, verbose
 
 seps='1e-05'
Index: test_opcodes.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_opcodes.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** test_opcodes.py	23 Jul 2002 19:03:58 -0000	1.11
--- test_opcodes.py	30 Jul 2002 23:27:11 -0000	1.12
***************
*** 1,5 ****
 # Python test set -- part 2, opcodes
 
! from test.test_support import *
 
 
--- 1,5 ----
 # Python test set -- part 2, opcodes
 
! from test.test_support import TestFailed
 
 
Index: test_pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pickle.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** test_pickle.py	23 Jul 2002 19:03:58 -0000	1.10
--- test_pickle.py	30 Jul 2002 23:27:11 -0000	1.11
***************
*** 2,6 ****
 import unittest
 from cStringIO import StringIO
! from pickletester import AbstractPickleTests, AbstractPickleModuleTests
 from test import test_support
 
--- 2,6 ----
 import unittest
 from cStringIO import StringIO
! from test.pickletester import AbstractPickleTests, AbstractPickleModuleTests
 from test import test_support
 
Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** test_re.py	23 Jul 2002 19:03:59 -0000	1.32
--- test_re.py	30 Jul 2002 23:27:12 -0000	1.33
***************
*** 268,272 ****
 print v
 
! from re_tests import *
 
 if verbose:
--- 268,272 ----
 print v
 
! from test.re_tests import *
 
 if verbose:
Index: test_sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sre.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** test_sre.py	23 Jul 2002 19:04:03 -0000	1.36
--- test_sre.py	30 Jul 2002 23:27:12 -0000	1.37
***************
*** 299,303 ****
 test("sre.match(r'(x)*?y', 50000*'x'+'y').span()", (0, 50001), RuntimeError)
 
! from re_tests import *
 
 if verbose:
--- 299,303 ----
 test("sre.match(r'(x)*?y', 50000*'x'+'y').span()", (0, 50001), RuntimeError)
 
! from test.re_tests import *
 
 if verbose:
Index: test_traceback.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_traceback.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_traceback.py	23 Jul 2002 19:04:08 -0000	1.5
--- test_traceback.py	30 Jul 2002 23:27:12 -0000	1.6
***************
*** 23,27 ****
 def syntax_error_without_caret(self):
 # XXX why doesn't compile raise the same traceback?
! import badsyntax_nocaret
 
 def test_caret(self):
--- 23,27 ----
 def syntax_error_without_caret(self):
 # XXX why doesn't compile raise the same traceback?
! import test.badsyntax_nocaret
 
 def test_caret(self):
Index: test_unpack.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unpack.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_unpack.py	23 Jul 2002 19:04:08 -0000	1.6
--- test_unpack.py	30 Jul 2002 23:27:12 -0000	1.7
***************
*** 1,3 ****
! from test.test_support import *
 
 t = (1, 2, 3)
--- 1,3 ----
! from test.test_support import TestFailed, verbose
 
 t = (1, 2, 3)

AltStyle によって変換されたページ (->オリジナル) /