Ezio Melotti
e3992eb743
#5723 : Improve json tests to be executed with and without accelerations.
2011-05-14 06:24:53 +03:00
Ezio Melotti
720f8dea19
Change import_fresh_module to work with packages.
2011-05-14 06:02:25 +03:00
Ezio Melotti
193c34ba86
#11910 : change import_fresh_module to return None when one of the "fresh" modules can not be imported.
2011-05-09 06:28:42 +03:00
Benjamin Peterson
01c9a16031
import_fresh_module ought to be in __all__
2011-05-08 15:32:04 -05:00
Antoine Pitrou
d43245a965
Merged revisions 87861,87863 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87861 | antoine.pitrou | 2011-01-08 11:23:29 +0100 (sam., 08 janv. 2011) | 3 lines
Fix test_ssl after r87849
........
r87863 | antoine.pitrou | 2011-01-08 11:28:11 +0100 (sam., 08 janv. 2011) | 3 lines
Add EHOSTUNREACH ('No route to host') to the errnos trapped by transient_internet().
........
2011-01-08 10:32:51 +00:00
Antoine Pitrou
91ce0d933c
Merged revisions 87695 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87695 | antoine.pitrou | 2011-01-03 19:23:55 +0100 (lun., 03 janv. 2011) | 5 lines
Issue #10806 , issue #9905 : Fix subprocess pipes when some of the standard
file descriptors (0, 1, 2) are closed in the parent process. Initial
patch by Ross Lagerwall.
........
2011-01-03 18:45:09 +00:00
Antoine Pitrou
d989f820c8
Merged revisions 85482 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85482 | antoine.pitrou | 2010-10-14 17:34:31 +0200 (jeu., 14 oct. 2010) | 4 lines
Replace the "compiler" resource with the more generic "cpu", so
as to mark CPU-heavy tests.
........
2010-10-14 15:43:25 +00:00
Antoine Pitrou
a2a53b27d3
Add support for "-3" flag ( closes #7516 )
2010-10-14 11:18:46 +00:00
Antoine Pitrou
a226c9100d
Merged revisions 85469 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85469 | antoine.pitrou | 2010-10-14 13:12:00 +0200 (jeu., 14 oct. 2010) | 3 lines
Inherit interpreter flags in parallel testing
........
2010-10-14 11:15:50 +00:00
Victor Stinner
cc676a0d7f
Recorded merge of revisions 83987 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83987 | victor.stinner | 2010-08-14 00:23:24 +0200 (sam., 14 août 2010) | 2 lines
Fix a typo: TESTFN_UNENCODEABLE => TESTFN_UNENCODABLE
........
2010-09-10 11:24:10 +00:00
Antoine Pitrou
286b8332d9
Merged revisions 84604 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84604 | antoine.pitrou | 2010-09-07 23:43:31 +0200 (mar., 07 sept. 2010) | 3 lines
Also catch some gaierrors
........
2010-09-07 21:46:05 +00:00
Antoine Pitrou
c818ed4d61
Merged revisions 84597-84599 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84597 | antoine.pitrou | 2010-09-07 22:42:19 +0200 (mar., 07 sept. 2010) | 5 lines
Issue #8574 : better implementation of test.support.transient_internet().
Original patch by Victor.
........
r84598 | antoine.pitrou | 2010-09-07 23:05:49 +0200 (mar., 07 sept. 2010) | 6 lines
Issue #9792 : In case of connection failure, socket.create_connection()
would swallow the exception and raise a new one, making it impossible
to fetch the original errno, or to filter timeout errors. Now the
original error is re-raised.
........
r84599 | antoine.pitrou | 2010-09-07 23:09:09 +0200 (mar., 07 sept. 2010) | 4 lines
Improve transient_internet() again to detect more network errors,
and use it in test_robotparser. Fixes #8574 .
........
2010-09-07 21:40:25 +00:00
Alexander Belopolsky
eeb666ccf3
Merged revisions 82850 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82850 | alexander.belopolsky | 2010-07-13 10:50:16 -0400 (Tue, 13 Jul 2010) | 1 line
Set sys.modules[name] to None instead of 0 to block module import.
........
2010-07-14 00:05:00 +00:00
R. David Murray
4653fb556c
#8889 : rewrite transient_internet so we don't use EAI_NODATA on FreeBSD.
...
FreeBSD doesn't have socket.EAI_NODATA. I rewrote the routine because
there's no easy way to conditionally include a context manager in a
with statement. As a side benefit, instead of a stack of context
managers there's now only one.
2010-06-03 20:19:25 +00:00
Victor Stinner
03883624a4
Issue #8835 : test_support.transient_internet() catchs gaierror(EAI_NONAME) and
...
gaierror(EAI_NODATA)
2010-05-27 22:29:48 +00:00
Victor Stinner
d9d147b806
Issue #7449 , part 1: fix test_support.py for Python compiled without thread
2010-04-27 21:46:03 +00:00
Philip Jenvey
bb66973afb
adjust gc_collect for Jython
2010-04-10 19:39:07 +00:00
Florent Xicluna
735885428d
#8155 : Preserve backward compatibility for test_support.check_warnings(). Add regression tests.
2010-03-18 19:51:47 +00:00
Florent Xicluna
3cc8f211ed
Issue #7783 and #7787 : open_urlresource invalidates the outdated files from the local cache.
...
Use this feature to fix test_normalization.
2010-03-15 18:08:58 +00:00
Florent Xicluna
1b51c3d4de
Do not chdir when running test_xml_etree, and enhance the findfile helper.
2010-03-13 12:41:48 +00:00
Florent Xicluna
4d42f2b4d1
#7772 : Fix test_py3kwarn. Now the test suite could pass with "-3" flag.
2010-03-09 19:57:01 +00:00
Florent Xicluna
fc8a1ed70e
Refresh the documentation for the test.test_support module.
2010-03-07 19:14:12 +00:00
Florent Xicluna
6de9e938a5
Issue #7849 : Now the utility ``check_warnings`` verifies if the warnings are
...
effectively raised. A new utility ``check_py3k_warnings`` deals with py3k warnings.
2010-03-07 12:18:33 +00:00
Ezio Melotti
9e9af21d45
skip tests with a non-ascii cwd when the file system encoding is ascii
2010-02-20 22:34:21 +00:00
Ezio Melotti
8f6a287029
#7712 : add a temp_cwd context manager to test_support and use it in regrtest to run all the tests in a temporary directory, saving the original CWD in test_support.SAVEDCWD. Thanks to Florent Xicluna who helped with the patch.
2010-02-10 21:40:33 +00:00
Brett Cannon
dc84f8fbb4
Fix a typo in a docstring introduced in r77956.
2010-02-03 22:13:44 +00:00
Brett Cannon
18e4db5ebe
Update a docstring to suggest using importlib.import_module instead of calling __import__ directly.
2010-02-03 22:11:54 +00:00
Ezio Melotti
469a05fe46
remove archaic functions from test_support
2010-01-24 20:48:35 +00:00
Antoine Pitrou
84ee9e257e
Use a custom timeout in test_support.open_urlresource.
2009-11-01 22:02:03 +00:00
Antoine Pitrou
59c44f36e0
Issue #7222 : Make thread "reaping" more reliable so that reference
...
leak-chasing test runs give sensible results. The previous method of
reaping threads could return successfully while some Thread objects were
still referenced. This also introduces a new private function:
:func:hread._count().
2009-10-30 17:07:08 +00:00
R. David Murray
a24db67d47
Clarify error report message, and don't recommend running in verbose
...
mode for more information if we are already running in verbose mode.
2009-10-19 17:53:58 +00:00
Nick Coghlan
f317019c07
Silence a deprecation warning by using the appropriate replacement construct
2009-10-18 10:29:10 +00:00
Nick Coghlan
fd4903bf05
Move restoration of the os.environ object into the context manager where it belongs
2009-10-17 15:45:52 +00:00
Nick Coghlan
8c1ffeb614
Don't invoke reload(sys) and use StringIO objects instead of real files to capture stdin and stdout when needed (ensures all sys attributes remain unmodified after test_xmlrpc runs)
2009-10-17 15:09:41 +00:00
Nick Coghlan
7df72dcdf9
Restore original sys.path when running TTK tests
2009-10-17 14:40:54 +00:00
Benjamin Peterson
9bd39c119e
put downloaded test support files in Lib/test/data instead of the cwd
2009-07-11 22:15:13 +00:00
Benjamin Peterson
5c8da86f3a
convert usage of fail* to assert*
2009-06-30 22:57:08 +00:00
Antoine Pitrou
1969059327
Issue #6215 : backport the 3.1 io lib
2009-06-12 20:14:08 +00:00
Benjamin Peterson
382ccdfd5b
remove function import
2009-05-31 14:43:00 +00:00
Antoine Pitrou
4698d9928e
Issue #6152 : New option '-j'/'--multiprocess' for regrtest allows running
...
regression tests in parallel, shortening the total runtime.
2009-05-31 14:20:14 +00:00
Benjamin Peterson
0db3cd6700
a useful decorator for cleaning up threads
2009-05-14 22:40:34 +00:00
Walter Dörwald
6733bed57e
Make test.test_support.EnvironmentVarGuard behave like a dictionary.
...
All changes are mirrored to the underlying os.environ dict, but rolled back
on exit from the with block.
2009-05-01 17:35:37 +00:00
Walter Dörwald
a145317be9
Issue #5837 : Certain sequences of calls to set() and unset() for
...
support.EnvironmentVarGuard objects restored the environment variables
incorrectly on __exit__.
Fix this by recording the initial value of each environment variable on the
first access in set() or unset().
2009-04-25 12:15:07 +00:00
Nick Coghlan
5533ff6a2e
Issue 5354: Change API for import_fresh_module() to better support test_warnings use case (also fixes some bugs in the original implementation)
2009-04-22 15:26:04 +00:00
Nick Coghlan
cd2e7042ae
Issue 5354: Provide a standardised testing mechanism for doing fresh imports of modules, including the ability to block extension modules in order to test the pure Python fallbacks
2009-04-11 13:31:31 +00:00
R. David Murray
bdeacba51b
Improve test_support.import_module docstring, remove
...
deprecated flag from get_attribute since it isn't likely
to do anything useful.
2009-03-31 19:33:15 +00:00
R. David Murray
597ebab744
A few more test skips via import_module, and change import_module to
...
return the error message produced by importlib, so that if an import
in the package whose import is being wrapped is what failed the skip
message will contain the name of that module instead of the name of the
wrapped module. Also fixed formatting of some previous comments.
2009-03-31 18:32:17 +00:00
R. David Murray
3db8a3432b
Change more tests to use import_module for the modules that
...
should cause tests to be skipped. Also rename import_function
to the more descriptive get_attribute and add a docstring.
2009-03-30 23:05:48 +00:00
R. David Murray
59beec326a
Add import_function method to test.test_support, and modify a number of
...
tests that expect to be skipped if imports fail or functions don't
exist to use import_function and import_module. The ultimate goal is
to change regrtest to not skip automatically on ImportError. Checking
in now to make sure the buldbots don't show any errors on platforms
I can't direct test on.
2009-03-30 19:04:00 +00:00
Benjamin Peterson
effa1dc709
** is required here
2009-03-26 21:30:54 +00:00