summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Added list of tests expected to be skipped on the mac.Jack Jansen2001-08-281-0/+36
|
* Removed --have-resources flag in favor of the more granular -u/--useBarry Warsaw2001-08-201-22/+61
| | | | | | | | | | | | | | | | | | | flag, which specifies external or resource intensive tests to perform. This is used by test_largefile and test_socket_ssl. -u/--use takes a comma separated list of flags, currently supported: largefile, network. usage(): New function. Note that the semantics of main() have changed slightly; instead of returning an error code, it raises a SystemExit (via sys.exit()) with the given error code. main(): use_large_resources => use_resources Also, added support for long-option alternative to the short options. _expectations: Added test_socket_ssl to the list of expectedly skipped tests.
* Fix SF bug [ #450245 ] Error in parsing future stmtsJeremy Hylton2001-08-201-0/+1
| | | | | Add test case to cover multiple future statements on separate lines of a module.
* Modify _Set to support iteration.Jeremy Hylton2001-08-121-0/+3
| | | | | Otherwise printlist(surprise) will fail with a TypeError, because map is called with an argument that doesn't support iteration.
* Make the output of tests skipped readable (i.e., deliberately break itTim Peters2001-08-121-6/+30
| | | | into indented lines each of which probably fits on a typical screen line).
* Add the list of expected skips for Linux 2.x. Restructured the code aGuido van Rossum2001-08-121-28/+51
| | | | | little bit using a dictionary to avoid more code duplication as more platforms are supported.
* Move line; reported on python-dev by Mark Favas (thanks!).Tim Peters2001-08-121-1/+1
|
* Teach regrtest which tests we *expect* to skip on Win32. Please teach itTim Peters2001-08-121-0/+85
| | | | about your platform too.
* runtest(): When generating output, if the result is a single line with theFred Drake2001-05-291-1/+19
| | | | | | name of the test, only write the output file if it already exists (and tell the user to consider removing it). This avoids the generation of unnecessary turds.
* Implementing an idea from Guido on the checkins list:Tim Peters2001-05-221-1/+8
| | | | | | | | When regrtest.py finds an attribute "test_main" in a test it imports, regrtest runs the test's test_main after the import. test_threaded_import needs this else the cross-thread import lock prevents it from making progress. Other tests can use this hack too, but I doubt it will ever be popular.
* If the file containing expected output does not exist, assume that itFred Drake2001-05-211-1/+6
| | | | | contains a single line of text giving the name of the output file. This covers all tests that do not actually produce any output in the test code.
* Fix compileall.py so that it fails on SyntaxErrorsJeremy Hylton2001-04-181-5/+0
| | | | | | | | | | | | | | | | | | | | | The changes cause compilation failures in any file in the Python installation lib directory to cause the install to fail. It looks like compileall.py intended to behave this way, but a change to py_compile.py and a separate bug defeated it. Fixes SF bug #412436 This change affects the test suite, which contains several files that contain intentional errors. The solution is to extend compileall.py with the ability to skip compilation of selected files. In the test suite, rename nocaret.py and test_future[3..7].py to start with badsyntax_nocaret.py and badsyntax_future[3..7].py. Update the makefile to skip compilation of these files. Update the tests to use the name names for imports. NB compileall.py is changed so that compile_dir() returns success only if all recursive calls to compile_dir() also check success.
* Add regression test for future statements. This adds eight files, butJeremy Hylton2001-02-281-0/+7
| | | | | seven are not tests in their own right; these files are mentioned in regrtest.
* Describe -s a little more generically.Barry Warsaw2001-02-231-5/+6
|
* String method conversion.Eric S. Raymond2001-02-091-4/+3
|
* Christmas present to myself: changed regrtest in two ways:Tim Peters2000-12-301-4/+30
| | | | | | | | | | | | | 1. When running in verbose mode, if any test happens to pass, print a warning that the apparent success may be bogus (stdout isn't compared in verbose mode). Been fooled by that too often. 2. When a test fails because the expected stdout doesn't match the actual stdout, print as much of stdout as did match before the first failing write. Else we get failures of the form "expected 'a', got 'b'" and a glance at the expected output file shows 500 instances of 'a' -- no idea where it failed, and, as in #1, trying to run in verbose mode instead doesn't help because stdout isn't compared then.
* Update the code to better reflect recommended style:Fred Drake2000-12-121-1/+1
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-3/+3
|
* Make the regrtest.py -l (findleaks) option considerably less obnoxious.Neil Schemenauer2000-10-131-4/+10
| | | | | | First, only report garbage that the GC cannot free. Second, only report the number of objects found, not their repr(). People can dig deeper on their own if they find a leak.
* - Replace debugleak flag with findleaks flag. The new SAVEALL GC option isNeil Schemenauer2000-09-221-6/+14
| | | | used to find cyclic garbage produced by tests.
* When skipping a test, do not include a spurious space between the exceptionFred Drake2000-08-231-1/+1
| | | | name and the ":" that separates it from the value. (Minor cleanup.)
* When a KeyboardInterrupt is caught, just use the "raise" syntax toFred Drake2000-08-181-2/+2
| | | | re-raise it instead of re-raising it "manually" the ugly way.
* Add largefile support for Linux64 and WIn64. Add test_largefile and some minorTrent Mick2000-08-111-7/+12
| | | | | | | | | | change to regrtest.py to allow optional running of test_largefile ('cause it's slow on Win64). This closes patches: http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100510&group_id=5470 and http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=100511&group_id=5470
* Make test_support.TestSkipped errors work the same way as ImportErrors:Thomas Wouters2000-08-041-1/+1
| | | | mark the test as 'skipped', rather than 'failed'.
* Added a -l/--leakdebug option which turns on DEBUG_LEAK if the gcBarry Warsaw2000-08-031-12/+23
| | | | module is importable.
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-1/+1
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* fix bug #42 reported by Andrew DalkeJeremy Hylton2000-07-111-0/+2
| | | | | | | | | | | | | | The Compare close contains a close method that checks to see if there is any unconsumed data in the Compare instance; i.e. if the canonical output file contains more data than was produced by the current test run. This method was never called, allowing differences to go undetected. Fix is to call close after the test is run (after __import__) output/test_long and output/test_popen2 needed trivial changes output/test_select contained lots of text, but test_select.py produced no output
* * added a randomize flag and corresponding -r command line argument thatSkip Montanaro2000-06-301-8/+13
| | | | | | | | | allows the caller to execute the various tests in pseudo-random order - default is still to execute tests in the order returned by findtests(). * moved initialization of the various flag variables to the main() function definition, making it possible to execute regrtest.main() interactively and still override default behavior.
* Alas, Vladimir's patch was too aggressive, and started causing reallyGuido van Rossum2000-05-051-1/+1
| | | | | | | | weird errors. (E.g. see thread "weird bug in test_winreg" in python-dev.) Since it's actually useful to be able to re-run an individual test after running test.autotest, we keep the unloading code, but only for modules whose full name starts with "test.".
* Patch by Vladimir Marangozov to unload additionally imported modulesGuido van Rossum2000-04-211-0/+5
| | | | | after each test has been run. This avoids excessive memory growth during the tests.
* Added a -s option which is useful for narrowing down memory leaks.Barry Warsaw1999-01-281-4/+42
| | | | | With -s only a single test is run. The next test run is chosen sequentially from the list of all tests.
* There was still something wrong. The original NOTTESTS are replacedGuido van Rossum1998-08-251-3/+6
| | | | | | by the new '-x' arguments, losing the previous items. Thus, test_support, test_b1 & test_b2 are executed (and warnings issued). (Discovered by Vladimir Marangozov.)
* Should pass explicit arguments to findtests(). Should initialize 'nottests'.Guido van Rossum1998-08-241-2/+4
|
* Generalized so it's useful for testing other packages, by AndrewGuido van Rossum1998-08-011-9/+34
| | | | Kuchling @ CNRI.
* Add writelines() method to Compare class.Guido van Rossum1998-04-231-0/+3
|
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-80/+80
|
* Catch KeyboardInterrupt separately and propagate it, instead ofGuido van Rossum1997-10-201-1/+4
| | | | | | reporting a "crash". Use sys.exc_info() instead of sys.exc_type and sys.exc_value.
* Pass optional arguments (globals(), locals(), []) to __import__() soGuido van Rossum1997-09-071-1/+1
| | | | | | | it will run as package test, e.g. this will run the test suite: import test.regrtest test.regrtest.main()
* Change default verbosity so that there are only three levels left: -q,Guido van Rossum1997-08-181-12/+15
| | | | | | default and -v. In default mode, the name of each test is printed. -v is the same as the old -vv. -q is more quiet than the old default mode; that's fine I think.
* Don't call sys.exit() all over the place -- simply return the exitGuido van Rossum1997-08-141-4/+4
| | | | | status from main() and call sys.exit(main()) in the startup stub at the end of the file.
* Add flush() method to fake file.Guido van Rossum1997-07-171-0/+3
|
* Catch all exceptions in test modules.Guido van Rossum1997-07-161-0/+6
|
* Add "extra-verbose" mode, triggered by specifying two -v flags. InGuido van Rossum1997-03-071-4/+12
| | | | | this mode, all tests are run in verbose mode with their output to stdout. No comparing of output is done.
* New regression test harness. See usage message / doc string.Guido van Rossum1996-12-201-0/+170