Romain Dorgueil
625b603f1f
Implements an option to choose the doctest output format in case of failure. ( fixes #1749 )
2016-07-23 13:06:05 +02:00
Bruno Oliveira
ae0798522f
Merge pull request #1711 from nicoddemus/invocation-scoped-fixtures
...
Invocation scoped fixtures
2016-07-21 19:48:52 -03:00
Bruno Oliveira
4c112401c5
Log LineMatcher output in a stream instead of stderr
...
This makes the match/nomatch output appear as part
of the fnmatch_lines() error on pytest's output instead
of globbered together with general stdout/stderr capture
2016-07-20 22:35:43 -03:00
Bruno Oliveira
05f3422d7c
Make monkeypatch invocation-scoped
2016-07-20 22:05:49 -03:00
Bruno Oliveira
4f2bf965cb
Merge remote-tracking branch 'upstream/features' into invocation-scoped-fixtures
2016-07-20 21:16:27 -03:00
Bruno Oliveira
20f97c3041
Small documentation improvements
2016-07-20 20:22:28 -03:00
Bruno Oliveira
e0f08a73ab
Merge branch 'features' into conftest-exception-printing
2016-07-20 19:33:36 -03:00
Bruno Oliveira
93aae987a2
Merge pull request #1744 from RonnyPfannschmidt/existfirst-override
...
allow --exitfirst/-x to be overridden by a following --maxfail
2016-07-20 18:16:07 -03:00
Ronny Pfannschmidt
9dadaa8a41
skipping plugin: remove python2.5 compat code
2016-07-20 17:45:20 +02:00
Ronny Pfannschmidt
2a05c311e9
implement exitfirst as store_const option
...
this makes it possible to override with a later maxfail
2016-07-20 17:15:29 +02:00
Ronny Pfannschmidt
61cc5c4d4e
argument parsing: always warn for string types
...
fix #1741
2016-07-19 10:33:25 +02:00
Ronny Pfannschmidt
317b3f257d
optparse compatibility - add float and complex
...
also documents the implementation quality
fixes #457
2016-07-19 10:20:41 +02:00
Ronny Pfannschmidt
8a73a2ad60
Merge pull request #1734 from nicoddemus/issue-1728-inconsistent-setup-teardown
...
setup_* and teardown_* functions argument now optional
2016-07-15 14:59:22 +02:00
Bruno Oliveira
ff8fb4950e
setup_* and teardown_* functions argument now optional
...
setup_module, setup_function and setup_method
extra argument are now optional and may be omitted.
Fix #1728
2016-07-14 23:41:40 -03:00
Floris Bruynooghe
d1852a48b7
Remove assertion reinterpretation
...
The assertion reinterpretation is an old backwards compatibility
mode which was no longer being maintained on feature-parity with
the assertion rewriting mode. It was also responsible for some
dubious patching of builtins and test with side-effects would
suddenly start passing. Since re-writing has been the default for
a long time and plugins are now also re-written it is time to
retire reinterpretation.
2016-07-15 00:33:39 +01:00
Floris Bruynooghe
24fbbbef1f
Merge pull request #1641 from flub/rewrite-plugins
...
Rewrite plugins
2016-07-14 19:39:15 +01:00
Floris Bruynooghe
51ee7f8734
Fixup things after rebase
...
Some changes to make things work on top of current features branch.
2016-07-14 12:42:29 +01:00
Bruno Oliveira
ab0b6faa5f
Deprecate support for passing command-line as string to pytest.main()
...
Fixes #1723
2016-07-14 08:11:43 -03:00
Bruno Oliveira
1266ebec83
Merge remote-tracking branch 'upstream/features' into warnings-displayed-by-default
...
# Conflicts:
# CHANGELOG.rst
# testing/test_terminal.py
2016-07-13 18:45:15 -03:00
Daniel Hahler
3cfebdd7c5
funcarg_prefix_warning: remove newline
...
Followup to https://github.com/pytest-dev/pytest/pull/1718 .
2016-07-13 18:33:24 +02:00
Floris Bruynooghe
743f59afb2
Introduce pytest.register_assert_rewrite()
...
Plugins can now explicitly mark modules to be re-written. By default
only the modules containing the plugin entrypoint are re-written.
2016-07-13 17:31:09 +01:00
Floris Bruynooghe
944da5b98a
Avoid rewrite warning for inline runs
...
When running pytest inline/inprocess we plugins have already been
imported and re-writen, so avoid the warning.
2016-07-13 17:29:19 +01:00
Floris Bruynooghe
a98e3cefc5
Enable re-writing of setuptools-installed plugins
...
Hook up the PEP 302 import hook very early in pytest startup so
that it gets installed before setuptools-installed plugins are
imported. Also iterate over all installed plugins and mark them
for rewriting. If an installed plugin is already imported then
a warning is issued, we can not break since that might break
existing plugins and the fallback will still be gracefull to
plain asserts.
Some existing tests are failing in this commit because of the new
warning triggered by inline pytest runs due to the hypothesis
plugin already being imported. The tests will be fixed in the next
commit.
2016-07-13 17:29:19 +01:00
Daniel Hahler
15e97a7c78
Add punctuation to funcarg_prefix_warning
2016-07-12 23:49:09 +02:00
Ronny Pfannschmidt
c4f20a1834
Merge pull request #1712 from anntzer/custom-debugger
...
Allow passing a custom Pdb subclass via --pdbcls.
2016-07-12 16:45:07 +02:00
Antony Lee
7ee3dd1cb5
Add tests for custom pdb class.
...
(and edit CHANGELOG)
2016-07-11 20:07:29 -07:00
Bruno Oliveira
458ecae1df
Replace all usages of "pytest_funcarg__" for @pytest.fixture
2016-07-11 22:21:52 -03:00
Bruno Oliveira
ad4125dc0d
Deprecate "pytest_funcarg__" prefix to declare fixtures
...
Fixes #1684
2016-07-11 22:21:50 -03:00
Bruno Oliveira
5506dc700c
Deprecate yield tests
...
Closes #16
Closes #1324
2016-07-11 22:21:49 -03:00
Bruno Oliveira
0ca06962e9
Improve docs
2016-07-11 20:33:16 -03:00
Bruno Oliveira
fb4da00a32
Merge remote-tracking branch 'upstream/features' into invocation-scoped-fixtures
2016-07-11 20:09:13 -03:00
Antony Lee
6383b53ad9
Allow passing a custom Pdb subclass via --pdbcls.
...
This obviates the need for plugins such as `pytest-ipdb`; instead one
can simply call `py.test --pdb=IPython.core.debugger:Pdb`
2016-07-09 21:10:52 -07:00
Bruno Oliveira
775100881a
Implement invocation-scoped fixtures
2016-07-09 22:52:05 -03:00
Ronny Pfannschmidt
8c49561470
split most fixture related code into own plugin
2016-07-09 20:36:00 +02:00
Ronny Pfannschmidt
b9a91dc112
merge from master to features
2016-07-06 11:51:48 +02:00
aostr
94e4a2dd67
* implemented changes recommended by nicoddemus
2016-07-05 15:22:27 +02:00
Javier Domingo Cansino
61e605f60b
Making conftest import failures easier to debug
2016-07-05 10:04:42 +01:00
Steffen Allner
6438895a23
Fix PEP-8.
2016-07-03 22:33:21 +02:00
Steffen Allner
b650c3c118
Implement --setup-show cli flag
...
to also be able to see fixture setup with normal test execution.
2016-07-03 22:30:51 +02:00
Bruno Oliveira
58e558141d
Remove commented out code
2016-06-26 21:19:07 +02:00
Bruno Oliveira
5891061ac1
Merge pull request #1675 from kvas-it/issue-1562
...
Add warning for assertions on tuples #1562
2016-06-26 16:09:15 -03:00
RedBeardCode
1b0dbd8c40
Move the freezing function from genscript.py to a new module freeze_support.py
2016-06-26 19:37:24 +02:00
RedBeardCode
0e2ebc96ff
Remove deprecated cmd options
...
Fixes #1657
2016-06-26 19:26:04 +02:00
aostr
1ce4670062
* removed tailing whitespaces
2016-06-26 06:51:57 +02:00
Vasily Kuznetsov
c17027e576
Warn about asserts on tuples ( fixes #1562 )
2016-06-25 19:21:48 +02:00
aostr
e04d9ff80b
* now showing pytest warnings summary by default.
...
* added ``--disable-pytest-warnings` flag to let users disable the warnings summary.
* extended/changed unit tests for the changes in the pytest core.
2016-06-25 18:16:13 +02:00
RedBeardCode
e2f550156e
Improve of the test output for logical expression with brackets.
...
Fixes #925
2016-06-25 18:10:36 +02:00
Ted Xiao
856e6cab75
add --override-ini option to overrides ini values
...
Signed-off-by: Ted Xiao <xiao.xj@gmail.com>
2016-06-25 23:45:32 +08:00
holger krekel
13a188fe37
Merge pull request #1647 from sallner/features
...
Add new options to report fixture setup and teardown
2016-06-25 16:38:37 +02:00
Bruno Oliveira
c519b9517a
Merge pull request #1663 from aostr/master
...
Rename the default plugin "pdb" into "debugging"
2016-06-25 09:56:54 -03:00