Commit Graph

348 Commits

Author SHA1 Message Date
R David Murray 576483085c #11093: make NOTTESTS empty by renaming confusingly named files in test dir.
Patch by Sandro Tosi.
2011-03-24 14:57:05 -04:00
R David Murray b588f8dd9f #11031: Add --testdir to specify where to find tests
Patch by Sandro Tosi.  The main purpose of this option is to allow
an alternate set of tests files to be used when running tests
of the regrtest tool itself.
2011-03-24 14:42:58 -04:00
R David Murray 03504fc2fb #11030: make --coverdir work for relative directories again. 2011-03-24 14:35:30 -04:00
Antoine Pitrou f3c524d535 Issue #11653: fix -W with -j in regrtest. 2011-03-23 23:05:07 +01:00
Antoine Pitrou 293954dd76 Issue #11653: fix -W with -j in regrtest 2011-03-23 23:01:49 +01:00
Antoine Pitrou 6ab79d9d5b Allow "-j0" as an argument to regrtest, to automatically select an
appropriate number of parallel workers.
2011-03-23 20:17:45 +01:00
R David Murray 661720e7f7 Make regrtest recognize test packages as well as test modules. 2011-03-21 15:14:34 -04:00
Antoine Pitrou c107fb1b59 Always print out the traceback when a test "crashed" 2011-03-21 19:55:58 +01:00
Antoine Pitrou 779a5b0b3a Always print out the traceback when a test "crashed" 2011-03-21 19:55:16 +01:00
Ezio Melotti 45763d0d12 Merge with 3.2. 2011-03-20 15:34:28 +02:00
Ezio Melotti 0123e055fa Add a check for sys.warnoptions in regrtest. 2011-03-20 15:09:26 +02:00
Raymond Hettinger 158c9c26fc Issue #11085: Moved collections abstract base classes into a separate module
called collections.abc, following the pattern used by importlib.abc.  For
backwards compatibility, the names continue to also be imported into the
collections module.
2011-02-22 00:41:50 +00:00
Brett Cannon 31f5929c1e Issue #10990: Prevent tests from clobbering a set trace function.
Many tests simply didn't care if they unset a pre-existing trace function. This
made test coverage impossible. This patch fixes various tests to put back any
pre-existing trace function. It also introduces test.support.no_tracing as a
decorator which will temporarily unset the trace function for tests which
simply fail otherwise.

Thanks to Kristian Vlaardingerbroek for helping to find the cause of various
trace function unsets.
2011-02-21 19:29:56 +00:00
Brett Cannon 63eef1e0dd Get --coverage to be an acceptable flag for test.regrtest again. 2011-01-06 22:32:41 +00:00
Georg Brandl be41a48fb8 On Py3k, -tt and -3 are no-op and unsupported respectively. 2011-01-05 21:47:47 +00:00
Victor Stinner 4b2b43d988 regrtest: close the new stdout and restore the original stdout at exit
Fix a ResourceWarning(unclosed file).
2011-01-05 03:54:26 +00:00
Antoine Pitrou 68530ac3c0 Mention --randseed in option list 2011-01-03 20:40:07 +00:00
Antoine Pitrou 3c4402f879 Issue #6293: Have regrtest.py echo back sys.flags. This is done by default
in whole runs and enabled selectively using `--header` when running an
explicit list of tests.  Original patch by Collin Winter.
2011-01-03 20:38:52 +00:00
R. David Murray 8e286c472b #7056: runtest and runtest_inner don't use testdir, so drop it from their sigs
I've only tested regular runs and -j runs.  If I've broken anything
else I'm sure I'll hear about it sooner or later.
2010-12-27 20:09:32 +00:00
Nick Coghlan 7bd5dbe9a0 More fine-grained monitoring of alterations to logging state 2010-12-05 07:17:25 +00:00
Nick Coghlan 7d8197516a Issue 10626 investigation: regrtest now checks for alterations to the logging state in the current process (and yes, test_pydoc alters it) 2010-12-05 06:45:03 +00:00
Michael Foord 3ab34ccae3 Factor out common code from lib/test/__main__.py and lib/test/regrtest.py into a function. 2010-12-03 12:27:40 +00:00
Nick Coghlan 4c4c0f2fe6 Partially revert r78719 - it removed a check that is still needed in some cases (i.e. this will allow Michael to add the test.__main__ support that broke the buildbots previously) 2010-12-03 07:44:33 +00:00
Antoine Pitrou d95c7b5f8a Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to regrtest. 2010-11-07 20:50:51 +00:00
Benjamin Peterson 54ad0beae0 set literals and unions are our friends 2010-10-29 21:33:10 +00:00
Benjamin Peterson 65c66ab255 make gdb skip expected 2010-10-29 21:31:35 +00:00
Antoine Pitrou 2b40efdfe8 Fix typo 2010-10-29 19:36:37 +00:00
Antoine Pitrou c14efc4e80 Make a GC run before trying to clean up files left over by
the latest test run.
2010-10-29 19:34:45 +00:00
Antoine Pitrou aa8796598a Actually restore the original asyncore socket map by making a copy of the dict 2010-10-29 11:54:38 +00:00
Skip Montanaro 97019ff665 test_gdb should be skipped on darwin (not up to v7 yet) 2010-10-25 01:35:48 +00:00
Antoine Pitrou ba8071241b Revert debug printout 2010-10-15 13:52:53 +00:00
Antoine Pitrou fe9791365d Enable debug output at the start of the regression suite instead.
Sorry for the ephemeral inconvenience.
2010-10-15 13:47:00 +00:00
Antoine Pitrou 5bc4fa7a49 Replace the "compiler" resource with the more generic "cpu", so
as to mark CPU-heavy tests.
2010-10-14 15:34:31 +00:00
Antoine Pitrou 1b03f2ca83 Inherit interpreter flags in parallel testing 2010-10-14 11:12:00 +00:00
R. David Murray 11cabcf73d #7110: have regrtest print test failures and tracebacks to stderr not stdout.
Patch by Sandro Tosi.
2010-09-29 01:08:05 +00:00
Florent Xicluna dc69e7217a Make test.regrtest.__file__ absolute, this was not always the case when running profile or trace, for example. (issue #9323) 2010-09-13 16:35:02 +00:00
Antoine Pitrou 36e778ef02 Issue #9433: The "-j" option to regrtest now works under Windows too.
It is not sure it will be beneficial, though, since process launching is
more expensive under Windows than it is under Linux.
2010-08-18 20:44:14 +00:00
Antoine Pitrou b14ac8c2b0 Save and restore the global asyncore.socket_map, and warn if a test modified it 2010-08-16 00:28:05 +00:00
Florent Xicluna ec882214fe Merged manually from 2.7 branch to 3.x trunk.
------------------------------------------------------------------------
  r80411 | florent.xicluna | 2010-04-23 19:59:10 +0200 (ven. 23 avril 2010) | 2 lignes

  Remove ImportWarnings filters.  They become obsolete after r79310, issue #8205.
  ------------------------------------------------------------------------
  r80412 | florent.xicluna | 2010-04-23 20:10:12 +0200 (ven. 23 avril 2010) | 2 lignes

  Fix the "regrtest -s" switch.
  ------------------------------------------------------------------------
  r81140 | florent.xicluna | 2010-05-13 19:05:29 +0200 (jeu. 13 mai 2010) | 3 lignes

  Add sensible information about the OS X platform to diagnose issue #8423:
  test_pep277 fails on "x86 Tiger" buildbot but not on "PPC Tiger".
  ------------------------------------------------------------------------
  r81141 | florent.xicluna | 2010-05-13 20:16:06 +0200 (jeu. 13 mai 2010) | 2 lignes

  Revert the additional OS X information (r81140).  Keep the endianness information.
  ------------------------------------------------------------------------
2010-08-09 16:56:43 +00:00
Georg Brandl e8e02e3b5b Fix regrtest -F. 2010-08-03 07:56:50 +00:00
Georg Brandl dee7b8503d #8560: add progress indicator to regrtest. 2010-08-02 18:59:52 +00:00
Brett Cannon 4507190a1e Switch the __import__ state check from using __builtins__ to builtins to be
nicer to other VMs.

Thanks to Philip Jenvey for the pointer.
2010-06-14 22:22:54 +00:00
Brett Cannon 5976d975f8 When dealing with __import__ for detecting a global state change made by a
test, make sure to check if __builtins__ is a dict or not.

Discovered when running importlib.test.regrtest.
2010-06-12 00:38:29 +00:00
Victor Stinner 1802d3f388 regrtest.py: call replace_stdout() before the first call to print()
print("==  ", os.getcwd()) fails if the current working directory is not ASCII
whereas sys.stdout encoding is ASCII.
2010-05-19 17:11:19 +00:00
Victor Stinner a3032807f9 regrtest.py: disable replace_stdout() on Windows until it is fixed
See issue #8533 (problem with newlines on Windows).
2010-05-07 00:57:12 +00:00
Ronald Oussoren 94f25283c9 Remove traces of MacOS9 support.
Fix for issue #7908
2010-05-05 19:11:21 +00:00
Victor Stinner f58087ba29 Issue #8533: revert r80694; try a different fix: regrtest uses backslashreplace
error handler for stdout to avoid UnicodeEncodeError (write non-ASCII character
to stdout using ASCII encoding)
2010-05-02 17:24:51 +00:00
Victor Stinner 0d80a5874a Issue #8533: Write tracebacks and failed tests to sys.stderr instead of
sys.stdout to avoid UnicodeEncodeError (use backslashreplace error handler)
2010-05-02 09:37:08 +00:00
Victor Stinner 45df820591 Merged revisions 80552-80556,80564-80566,80568-80571 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80552 | victor.stinner | 2010-04-27 23:46:03 +0200 (mar., 27 avril 2010) | 3 lines

  Issue #7449, part 1: fix test_support.py for Python compiled without thread
........
  r80553 | victor.stinner | 2010-04-27 23:47:01 +0200 (mar., 27 avril 2010) | 1 line

  Issue #7449, part 2: regrtest.py -j option requires thread support
........
  r80554 | victor.stinner | 2010-04-27 23:51:26 +0200 (mar., 27 avril 2010) | 9 lines

  Issue #7449 part 3, test_doctest: import trace module in test_coverage()

  Import trace module fail if the threading module is missing. test_coverage() is
  only used if test_doctest.py is used with the -c option. This commit allows to
  execute the test suite without thread support.

  Move "import trace" in test_coverage() and use
  test_support.import_module('trace').
........
  r80555 | victor.stinner | 2010-04-27 23:56:26 +0200 (mar., 27 avril 2010) | 6 lines

  Issue #7449, part 4: skip test_multiprocessing if thread support is disabled

  import threading after _multiprocessing to raise a more revelant error message:
  "No module named _multiprocessing". _multiprocessing is not compiled without
  thread support.
........
  r80556 | victor.stinner | 2010-04-28 00:01:24 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py

   * Split Test.test_open() in 2 functions: test_open() and test_thread_open()
   * Skip test_open() and test_thread_open() if we are unable to find the C
     library
   * Skip test_thread_open() if thread support is disabled
   * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError()
........
  r80564 | victor.stinner | 2010-04-28 00:59:35 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 6: fix test_hashlib for missing threading module

  Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing().
........
  r80565 | victor.stinner | 2010-04-28 01:01:29 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 7: simplify threading detection in test_capi

   * Skip TestPendingCalls if threading module is missing
   * Test if threading module is present or not, instead of test the presence of
     _testcapi._test_thread_state
........
  r80566 | victor.stinner | 2010-04-28 01:03:16 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing

  TestFifo can be executed without the threading module
........
  r80568 | victor.stinner | 2010-04-28 01:14:58 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 9: fix test_xmlrpclib for missing threading module

   * Skip testcases using threads if threading module is missing
   * Use "http://" instead of URL in ServerProxyTestCase if threading is missing
     because URL is not set in this case
........
  r80569 | victor.stinner | 2010-04-28 01:33:58 +0200 (mer., 28 avril 2010) | 6 lines

  Partial revert of r80556 (Issue #7449, part 5, fix ctypes test)

  Rewrite r80556: the thread test have to be executed just after the test on
  libc_open() and so the test cannot be splitted in two functions (without
  duplicating code, and I don't want to duplicate code).
........
  r80570 | victor.stinner | 2010-04-28 01:51:16 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 10: test_cmd imports trace module using test_support.import_module()

  Use test_support.import_module() instead of import to raise a SkipTest
  exception if the import fail. Import trace fails if the threading module is
  missing.

  See also part 3: test_doctest: import trace module in test_coverage().
........
  r80571 | victor.stinner | 2010-04-28 01:55:59 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, last part (11): fix many tests if thread support is disabled

   * Use try/except ImportError or test_support.import_module() to import thread
     and threading modules
   * Add @unittest.skipUnless(threading, ...) to testcases using threads
........
2010-04-28 22:31:17 +00:00
R. David Murray 0ba81e004a Merged revisions 80503 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80503 | r.david.murray | 2010-04-26 12:54:57 -0400 (Mon, 26 Apr 2010) | 2 lines

  Issue 8325: Improve regrtest --help text.
........
2010-04-26 17:02:32 +00:00