Commit Graph

533 Commits

Author SHA1 Message Date
holger krekel f7c1b9087a fix test 2011-11-11 23:18:33 +00:00
holger krekel 36c42b5c15 introduce a new -m mark_expression option 2011-11-11 23:02:06 +00:00
holger krekel bc8ee95e72 add ini-file "markers" option and a cmdline option "--markers" to show defined markers. Add "skipif", "xfail" etc. to the set of builtin markers shown with the --markers option. 2011-11-11 22:56:11 +00:00
holger krekel 979dfd20f2 add a method to the config object to dynamically add a value to an (line-type) ini-value 2011-11-11 22:56:08 +00:00
holger krekel bd296c796f try to avoid timing/race condition 2011-11-08 23:04:31 +00:00
holger krekel 7144cec580 avoid race condition in test, fix doc link 2011-11-08 22:06:57 +00:00
holger krekel 99a1188287 simplify durations output, no percentage, no "remaining" bits 2011-11-08 20:57:19 +00:00
holger krekel 0b18b6094e fix duration option in case of collection errors 2011-11-08 19:00:25 +00:00
holger krekel a324826dfd separate out the duration tests 2011-11-08 18:12:16 +00:00
holger krekel 29bf205f3a make --durations also show the execution times of setup/teardown calls. This requires a slight incompatibility - pytest_runtest_logreport now sees setup/teardown reports even if the tests passed. 2011-11-08 17:53:46 +00:00
holger krekel 3b9fd3abd8 introduce --durations=N showing slowest test executions 2011-11-08 17:20:56 +00:00
holger krekel 974e4e3a9d skip the symlink test on windows, win32/py32 does not support it without privs 2011-11-07 22:00:12 +00:00
holger krekel 369b7709f7 use os.symlink to make things work on windows/py32 2011-11-07 21:02:07 +00:00
holger krekel a2f4a11301 refine lsof/FD leakage testing and rework test setup and some of pytest own tests. Note that the actual diff to non-test code is small. Also remove some redundant tests (introduced by a copy-paste-error apparently in test_mark.py). 2011-11-07 18:08:41 +00:00
holger krekel 077c468589 don't remove symlinks from temporary directory path - should help with some standard OSX setups 2011-11-06 19:34:02 +00:00
holger krekel d4fe273b2f fix FD leakage during pytest's own test run and add "--lsof" option to tox default test runs.
the leakage came down to a problematic bit of the stdlib logging module: it takes ownerships of stdout/stderr making it hard for pytest to implement clean capturing.  The current work around is to add some extra code in the setup machinery of pytest's own tests which actually closes sub-FDs.
2011-11-06 15:40:17 +00:00
Ronny Pfannschmidt 5ae04397bd proper tests for issue74, thanks Arfrever 2011-10-26 23:59:22 +02:00
Ronny Pfannschmidt 2c230f910d fix issue74 - propperly filter out missfit names in _tryconvertpyarg 2011-10-26 22:40:08 +02:00
Floris Bruynooghe e2201fe3a9 Look up the pytest_assertrepr_compare hook for each test item
Before this was only done at the time the assertion plugin was loaded.
This lead to counter-intuitive behaviour where two subdirectories with
a pytest_assertrepr_compare hook in their conftest.py would not work,
only one would ever be used.

This defers assiging the _pytest.assertion.util._reprcompare function
until the item is loaded (pytest_runtest_setup) so that it can use the
hookrelay of the test item to find the appropriate
pytest_assertrepr_compare hook for the item.

This fixes issue #77.
2011-10-16 11:51:15 +01:00
Benjamin Peterson 29b4082b00 put the explanation generating code in the conditional fail body (fixes #79) 2011-10-14 16:26:13 -04:00
Ronny Pfannschmidt 6ac638ba87 add a reportchar for reporting errors, fixes #76 2011-09-29 23:44:26 +02:00
Ronny Pfannschmidt f2512017ea correctly handle zero length cmdline arguments 2011-09-25 23:26:49 +02:00
holger krekel 3bd3ba133f fix issue75 - test failure on jython.
also experimentally enable more tests in the jython test env.
2011-09-25 07:40:43 +02:00
holger krekel d37af98db3 try to make test suite pass on jython 2.5.1 again 2011-09-21 08:12:37 +02:00
holger krekel eaec527a60 relax error string matching 2011-09-21 06:21:48 +02:00
Benjamin Peterson 2bc4065a00 rewrite file newlines when the python parser is picky 2011-09-20 17:53:07 -04:00
holger krekel 5c32421f2e merge, bump version 2011-09-12 08:57:35 +02:00
Florian Mayer 2315de8321 Add FIXME. 2011-09-05 22:01:50 +02:00
Florian Mayer 25711a0879 Add acceptance test for new --pyargs behavior. 2011-09-05 17:38:22 +02:00
Benjamin Peterson 8675cf640d every boolop operand must have it's own format context (fixes #69) 2011-08-30 10:34:21 -04:00
Benjamin Peterson 661a8a4a92 only use the last part of the module name in the filename (fixes #68) 2011-08-30 00:12:07 -04:00
Benjamin Peterson abe080c6b4 use different caches for optimized and unoptimized code (fixes #66) 2011-08-29 10:13:00 -04:00
holger krekel fb1b1d9aae jython-2.5.2 has a core bug preventing pytest to run :( 2011-08-19 19:25:52 +02:00
holger krekel c426a67b0e make test skipping more precise to fix a py32 test failure 2011-08-18 22:52:02 +02:00
Ronny Pfannschmidt 7636dc76e0 support pytest.set_trace in collection 2011-08-01 10:53:37 +02:00
Benjamin Peterson 643ab120f4 only try to create the __pycache__ dir (not a tree to it) fixes #60
Also, improve error handling surrounding __pycache__ creation.
2011-07-25 21:40:38 -05:00
Benjamin Peterson f86c8469f5 now fix py3... 2011-07-19 22:56:34 -05:00
Benjamin Peterson 22335acd09 use binary mode 2011-07-19 22:45:27 -05:00
Benjamin Peterson 8b866aa065 add a newline for window's sake 2011-07-19 22:41:58 -05:00
Benjamin Peterson 2c4964d290 escape '%' in specialized comparison explanations (fixes #63) 2011-07-19 21:42:00 -05:00
holger krekel 650c3bcfde enhance debug tracing: print trace tags at the end of message and forget about "prefix".
Always log to "pytestdebug.log" if "--debug" option is given.
also move related code to pytest_helpconfig plugin.
2011-07-14 19:11:50 +02:00
Benjamin Peterson ade9b9aa8e add a test for vararg call 2011-07-14 11:46:32 -05:00
Benjamin Peterson 7576b3c7d0 fix assertion rewriting on calls with a double-star arg 2011-07-14 11:45:42 -05:00
Benjamin Peterson 85415135a4 merge heads 2011-07-13 13:34:24 -05:00
Benjamin Peterson 3cc8697744 respect sys.dont_write_bytecode and PYTHONDONTWRITEBYTECODE 2011-07-13 13:33:54 -05:00
holger krekel 703da22831 put systemout/systemerr to correct xml location 2011-07-13 18:47:27 +02:00
Benjamin Peterson 14ceaf2459 fix assertion rewriting in read-only directories (refs #60) 2011-07-12 17:09:14 -05:00
holger krekel f3bc197afb fix #59: provide better Jenkins stdout and stderr sections 2011-07-12 23:09:03 +02:00
Benjamin Peterson a59c2c9e17 roll test_long_chain in with other boolop tests 2011-07-11 09:24:07 -05:00
Michał Bartoszkiewicz 6096aeca53 Fix a typo in assertion rewriting. 2011-07-11 11:57:47 +02:00