holger krekel
e91dc7c895
up pytest version to 2.1.0.dev8, depend on py-1.4.4.dev2
2011-07-05 19:14:38 +02:00
Benjamin Peterson
4e8b9fab3c
insure moving pyc files around is atomic
2011-07-05 12:02:53 -05:00
holger krekel
d105e75d87
fix pytest-xdist breakage
2011-07-05 18:01:31 +02:00
holger krekel
46950ef19a
rename and simplify the assert option:
...
cmdline usage is now: --assert=rewrite/reinterp/plain
there is no conflict detection (don't think that's neccessary)
2011-07-05 17:29:53 +02:00
holger krekel
407ca5b120
fix python2.5 compatibility
2011-07-05 15:21:08 +02:00
Benjamin Peterson
fefdca5787
simplify
2011-06-29 14:00:13 -05:00
Benjamin Peterson
c7d120ec1c
we want second resolution on mtime
2011-06-29 13:55:26 -05:00
Benjamin Peterson
1707168b62
don't try to remove pycs twice
2011-06-29 12:16:47 -05:00
Benjamin Peterson
aa7f7a1c71
rename --assertmode choices to be more explicit
2011-06-29 09:44:04 -05:00
Benjamin Peterson
48b76c7544
rewrite test modules on import
2011-06-28 21:13:12 -05:00
Benjamin Peterson
d52ff3e2b9
use a plain old list for queuing
2011-06-28 21:11:56 -05:00
Benjamin Peterson
f286a02582
rewrite with proper short-circuting on boolean operators ( fixes #57 )
2011-06-28 20:21:22 -05:00
Benjamin Peterson
c6e3606c6b
fix the rewriter on relative imports ( fixes #58 )
2011-06-28 10:39:11 -05:00
Benjamin Peterson
8772b8c928
fix name
2011-06-13 08:50:50 -05:00
Benjamin Peterson
8e81ed693a
put explanation simplification in format_explanation so everyone can benefit
2011-06-12 22:41:58 -05:00
Benjamin Peterson
d853d9a9af
treat local as a black box
2011-06-12 21:57:22 -05:00
Benjamin Peterson
57a3d4d6d8
some tweaks to allow pypy apptests to use newinterpret
2011-06-12 17:07:49 -05:00
Benjamin Peterson
43de6c270f
fix assertion introspection on python 3.2+
2011-06-03 16:51:49 -05:00
holger krekel
ce1b456762
back out pytest_configure_funcargs hook for now
2011-06-01 15:08:54 +02:00
holger krekel
e3b2792677
fix issue49 - avoid confusing errors when initialization goes wrong
2011-06-01 14:54:34 +02:00
holger krekel
67859158d4
fix issue48 - test and fix typo in MarkInfo repr
2011-06-01 08:03:06 +02:00
holger krekel
6c90059342
- properly include _pytest.assertion in distribution
...
- import assertion only at import-test module time
2011-05-31 15:21:08 +02:00
holger krekel
5690beab5a
merge Benjamin's assertion-rewrite branch: all assertion related code is now part of py.test core distribution - the builtin assertion plugin to be precise.
...
See doc/assert.txt for details on how what has been improved.
2011-05-31 14:11:53 +02:00
Benjamin Peterson
5e31624315
return to the old scheme of rewriting test modules from _importtestmodule
2011-05-28 18:47:16 -05:00
Ronny Pfannschmidt
89a98e3276
also apply normpath to junitxml file path
2011-05-28 16:21:57 +02:00
holger krekel
410438f187
fix issue43 - better tracebacks for unexpected exceptions in doctests
2011-05-28 14:38:15 +02:00
holger krekel
8dc4e732f0
fix issue47 - fix time-per-test timing output for junitxml
2011-05-28 14:03:10 +02:00
Ronny Pfannschmidt
56b40ebd75
use os.path.expanduser/expandvars on the junitxml path for convience, fixes #44
2011-05-27 07:54:03 +02:00
Benjamin Peterson
5f75c5851f
can use non-underscored addoption
2011-05-26 23:15:33 -05:00
Benjamin Peterson
e56838cb6c
write an explicit raise if the assertion fails
2011-05-26 21:15:40 -05:00
Benjamin Peterson
d53feaf6f0
fix help for --assertmode
2011-05-26 20:59:43 -05:00
Benjamin Peterson
914f689ee8
beef up --assertmode help
2011-05-26 20:33:12 -05:00
Benjamin Peterson
16b4f54545
remove module before/after import hooks
2011-05-26 20:00:29 -05:00
Benjamin Peterson
abb07fc732
new way to rewrite tests: do it all during fs collection
...
This should allow modules to be rewritten before some other test module loads
them.
2011-05-26 19:57:30 -05:00
Benjamin Peterson
cf6949c9a3
stuff contents of pytest_collection hook into perform_collect
2011-05-26 19:53:47 -05:00
Benjamin Peterson
2f984e0c23
remove after_initial_collect hook
2011-05-26 19:43:02 -05:00
Benjamin Peterson
0a7237b72f
refactor common config/session protocol code for main() functions
2011-05-26 19:09:42 -05:00
Benjamin Peterson
f684a9ed56
expose Session on pytest namespace
2011-05-26 18:58:31 -05:00
Benjamin Peterson
196cece338
add a hook called after the inital fs collection
2011-05-26 18:57:37 -05:00
Benjamin Peterson
241ff0b43a
add a hook called when a Module is successfully created
2011-05-26 18:56:45 -05:00
Benjamin Peterson
411e9b136b
do configure hooks here, too
2011-05-26 18:37:04 -05:00
Benjamin Peterson
96521ada68
call configure hooks in reparseconfig
2011-05-26 18:11:12 -05:00
Benjamin Peterson
657522b629
a less ugly way to detect if assert rewriting is enabled
2011-05-26 17:17:48 -05:00
Benjamin Peterson
dd199d255c
move _setupstate into session
2011-05-26 17:08:56 -05:00
Benjamin Peterson
89d6defd68
correctly initialize and shutdown sessions
2011-05-26 17:08:44 -05:00
Benjamin Peterson
bf3d9f3737
correct attribute name
2011-05-26 16:18:18 -05:00
Benjamin Peterson
32a67f9622
add some tracing in the assert plugin
2011-05-26 16:08:25 -05:00
Benjamin Peterson
d438a0bd83
introduce --assertmode option
2011-05-26 14:34:27 -05:00
Benjamin Peterson
d3645758ea
this comment was moved away
2011-05-26 13:17:39 -05:00
Benjamin Peterson
15b9e8ed7d
forgot to util module
2011-05-26 13:17:26 -05:00
Benjamin Peterson
ee64da4bad
fix grammar
2011-05-26 13:15:21 -05:00
Benjamin Peterson
4fe13e59a7
fix comment
2011-05-26 13:15:03 -05:00
Benjamin Peterson
250160b4b0
refactor explanation formatting things into their own module
2011-05-26 12:01:34 -05:00
Benjamin Peterson
f423ce9c01
import assertion code from pylib
2011-05-25 17:54:02 -05:00
Benjamin Peterson
491c05cea7
create the _pytest/assertion package
2011-05-25 16:18:45 -05:00
Benjamin Peterson
e02d22aa4f
expand try/except/finally which py2.4 does't like
2011-05-25 15:55:57 -05:00
Benjamin Peterson
b061e71da9
account for py3 dict.values
2011-05-24 18:28:20 -05:00
Benjamin Peterson
0bb84abca7
handle comparison results which raise when asked for their truth value
2011-05-24 18:15:08 -05:00
Benjamin Peterson
7fc2f8786f
refactor writing the fake pyc into its own function
2011-05-24 17:48:56 -05:00
Benjamin Peterson
76cede83c0
add a way to disable assertion rewriting for a module
2011-05-24 17:30:35 -05:00
Benjamin Peterson
993efe927b
fix sentence
2011-05-24 17:28:20 -05:00
Benjamin Peterson
9c4f6791e5
give initial imports a reasonable lineno
2011-05-24 17:21:58 -05:00
Benjamin Peterson
265b7458cb
in the common case, the and operation isn't needed
2011-05-19 22:11:18 -05:00
Benjamin Peterson
dc3e39e95c
a less silly way to check comparison results
2011-05-19 21:57:27 -05:00
Benjamin Peterson
4f2166c997
use assertion rewriting on test files
...
This works by writing a fake pyc with the asserts rewritten.
2011-05-19 21:52:10 -05:00
Benjamin Peterson
e0c128beec
unconditionally override lineno and col_offset on generated ast
2011-05-19 21:49:37 -05:00
Benjamin Peterson
bf039fea74
add hooks before and after a module is imported
2011-05-19 21:45:33 -05:00
Benjamin Peterson
78be3db9bb
remove unneeded list
2011-05-19 19:15:20 -05:00
Benjamin Peterson
aae89cd021
correctly handle multiple asserts
2011-05-19 18:56:48 -05:00
Benjamin Peterson
9ac818fb5c
small refactoring
2011-05-19 18:32:48 -05:00
Benjamin Peterson
9e6dfaefd9
place assertion imports after __future__ statements and docstrings
2011-05-19 16:53:13 -05:00
Benjamin Peterson
c742e47de0
new assertion debugger which rewrites asserts before they are run
2011-05-18 15:31:10 -05:00
holger krekel
95ddd5059f
bumping version and adding changelog entry for configure funcargs
2011-05-13 09:57:35 +02:00
Ronny Pfannschmidt
b6815538c5
introduce the pytest_configure_funcargs hook for better control on funcarg instanciation/configuration
2011-05-12 23:47:05 +02:00
holger krekel
07e870dc14
unbump version to retag
2011-05-11 11:54:30 +02:00
holger krekel
ee53b1f591
bump version
2011-05-11 11:23:46 +02:00
holger krekel
420bbfd9a9
bump version
2011-04-17 23:09:13 +02:00
holger krekel
942ae47cd1
tentatively use internal list for cleanups at unconfigure time - this helps reporting with partially executed pytest_configure() hooks
2011-04-17 12:20:13 +02:00
holger krekel
06ca7090f9
fix issue38 - nicer tracebacks on sessionstart/configure (and other internal/custom hook failures)
2011-04-17 12:20:11 +02:00
Floris Bruynooghe
1c1918eb22
Prevent null-characters from appearing in junitxml's output
...
The Jenkins XML parser does not deal with null-characters inside the
XML. This replaces any null character with nothing in the XML output,
which makes no visual difference.
2011-04-16 00:09:25 +01:00
Floris Bruynooghe
60ff2e8529
Allow unicode characters in testdir.makepyfile()
...
On python2.x text arguments where passed through str, which meant only
ascii-encodable strings could be used. This uses
py.builting._totext() to keep unicode until it is written out to the
file, which was already UTF-8 encoded.
2011-04-11 23:15:56 +01:00
holger krekel
b7ba4d4e70
shift version string to _pytest directory
2011-03-19 20:13:04 +01:00
holger krekel
3a9788fc6f
fix missing reason/name information for skipped tests
2011-03-19 17:59:07 +01:00
holger krekel
1d40abadc4
offer a semi-internal method to create a config object in subprocesses
...
(helps pytest-xdist plugin to fix issue34)
2011-03-16 18:00:52 +01:00
holger krekel
ed6d2537bc
fix issue33 - no collection error for classes prefixed "test" deriving from object
2011-03-16 16:36:18 +01:00
holger krekel
a9f1f26a39
don't import stuff at genscript import time but rather when it is used
2011-03-12 20:12:19 +01:00
holger krekel
a7131dc911
speed up skipping
2011-03-11 15:43:24 +01:00
holger krekel
55657d6c51
simplify _locationline helper
2011-03-08 13:44:53 +01:00
holger krekel
1a7c6ecc42
fix slightly wrong verbose output for non subclasses on windows
2011-03-08 13:37:00 +01:00
holger krekel
f2670651b3
half the overhead for calling a test function by introducing some caching
2011-03-07 18:28:45 +01:00
holger krekel
5470cadbff
fix issue25 --pdb and win32/python encodings cause a crash in certain situations.
...
The reason is not clear but avoiding a fresh copy of the terminal writer
helps, maybe because the underlying file object has some state?
2011-03-07 13:17:07 +01:00
holger krekel
c552b58dc5
fix issue27 - --collectonly and -k keyword selection now work together.
...
internally, collectonly and terminal reporting has been unified.
2011-03-06 18:32:00 +01:00
holger krekel
18e784c9c9
re-introduce pytest._fillfuncargs - it's actually used by oejskit,
...
added a test documenting this.
2011-03-06 08:56:58 +01:00
Ronny Pfannschmidt
a6c518e68c
unittest plugin: prune __unittest marked modules from traces
2011-03-05 17:49:51 +01:00
holger krekel
9c952b3ce0
actually don't expose unused _fillfuncargs
2011-03-05 14:31:01 +01:00
holger krekel
07cee24122
avoid deprecation warnings for our internal accesses
2011-03-05 14:16:27 +01:00
holger krekel
318e8a404b
fix and improve error reporting for parametrizing funcargs (originally reported by antlong)
2011-03-05 12:11:35 +01:00
holger krekel
fadd1a2313
incorporate typo/grammar fixes from Laura and respond to a number of issues she raised in comments.
...
Also fixed links and some other bits and pieces.
2011-03-03 23:40:38 +01:00
holger krekel
070c73ff2f
fix issue30 (the second time)
...
put module globals into namespace for xfail and skipif expressions
2011-03-03 23:22:55 +01:00
holger krekel
682773e0cb
fix issue30 - better handling and reporting of errors in xfail expressions
2011-03-03 12:19:17 +01:00