Bruno Oliveira
748da0e5d7
Fix xml generation when used with pytest-xdist
...
pytest_runtest_logreport must be careful to not depend on setup/call/teardown
being called sequentially in that order, as xdist will call them as they are reported
from the slaves
Fix #1064
2015-09-26 03:21:24 -03:00
holger krekel
4867554eec
Merge branch 'master' into features
2015-09-23 16:42:42 +02:00
Ronny Pfannschmidt
a3fdcd9b17
Merge pull request #1031 from pytest-dev/unmarshable-parametrize
...
Parametrized values containing non-ascii bytes break cache
2015-09-23 09:03:51 +02:00
Ronny Pfannschmidt
e5c76cb22d
Merge pull request #1054 from nicoddemus/cache-fixture-docstring
...
Add docstring to cache fixture
2015-09-23 09:00:01 +02:00
Bruno Oliveira
79ebca3f30
(w)warnings -> (w)pytest-warnings in "-r chars" help
2015-09-23 01:09:09 -03:00
Bruno Oliveira
25d2cc4604
Add docstring to cache fixture
...
Fixes #1049
2015-09-22 23:46:05 -03:00
Bruno Oliveira
e1063678f1
escape bytes when creating ids for parametrized values
2015-09-22 23:18:09 -03:00
Bruno Oliveira
9d1ae0a149
Merge pull request #1048 from RonnyPfannschmidt/pytest-1029
...
fixes #1029 by handling access errors for cache dirs as pytest warning
2015-09-22 19:04:04 -03:00
Florian Bruhin
c10f483b9f
Don't hardcode 'std' for captured stdout/stderr.
...
This will make Item.add_report_sect more usable for plugins.
See https://github.com/eisensheng/pytest-catchlog/pull/7
2015-09-22 20:29:16 +02:00
Ronny Pfannschmidt
ea9a491fb3
add an acceptance test for cache write errors
2015-09-22 20:24:37 +02:00
holger krekel
ca460e11e6
Merge pull request #1051 from Akasurde/issue_1027
...
Added minor documentation change in python.py
2015-09-22 17:09:25 +02:00
Abhijeet Kasurde
dc1ce51ac2
Added minor documentation change
...
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-09-22 20:15:49 +05:30
Ronny Pfannschmidt
29f4da93d4
handle access errors when writing cache files silently as pytest warning, fixes #1039
2015-09-22 16:28:19 +02:00
Ronny Pfannschmidt
36924b59bd
Merge branch '653-deprecated-context-manager' of https://github.com/chiller/pytest into features
2015-09-22 15:14:06 +02:00
holger krekel
48df2f6842
Merge branch 'master' into features
2015-09-22 11:23:05 +02:00
holger krekel
41d61ed221
Merge pull request #1023 from RonnyPfannschmidt/fix-877
...
Fix 877
2015-09-22 11:17:02 +02:00
holger krekel
97f7815feb
also change pytest version to target 2.9.0
2015-09-22 11:01:33 +02:00
holger krekel
e2f72ffed8
start bugfix changelog on master
2015-09-22 10:59:23 +02:00
Galaczi Endre
9f77a8507e
removed mutation of global state, changed filter addition in WarningsRecorder
2015-09-21 19:01:23 +01:00
Galaczi Endre
beaa8e55bd
Fixes #653 use deprecated_call as context_manager
2015-09-21 19:01:23 +01:00
Floris Bruynooghe
80897f62a6
Merge pull request #974 from nicoddemus/addoption-conftest
...
Add warning about implementing pytest_addoption in conftest files
2015-09-21 11:28:31 +01:00
Andy Freeland
b1c9b8b415
Make tmpdir resiliant to user ids that do not exist
...
Previously, the tmpdir fixture would fail if the current process's user
id does not correspond to a valid user (e.g. running pytest in a Docker
container with 'docker run -u').
2015-09-18 21:26:19 -04:00
Ronny Pfannschmidt
7658f60146
#877 - reencoding causes typeerrors on python2
2015-09-19 00:30:01 +02:00
Ronny Pfannschmidt
49c99a41ea
reencode non-ascii python2 assertion reprs, fixes #877
...
i decided against using a warning since the problem goes away with python3
the support code can be removed once we drop python2 in 10 years or so
2015-09-19 00:30:01 +02:00
Bruno Oliveira
f02d9425f9
Bump version to 2.8.0
2015-09-18 19:04:20 -03:00
Ronny Pfannschmidt
1aca998f3f
Merge pull request #1012 from lukas-bednar/junitxml_plugin
...
junitxml: align custom properties with junit format
2015-09-18 16:01:22 +02:00
Lukas Bednar
02a2272cfe
junitxml: move custom properties to properties element
...
<testsuite>
<testcase>
<properties>
<property name="ABC" value="XYZ" />
<property name="DEF" value="ZYX" />
</properties>
</testcase>
</testsuite>
2015-09-17 15:56:41 +02:00
Florian Bruhin
fe8def98e4
Merge pull request #1020 from hpk42/pluggy031
...
re-vendor pluggy to 0.3.1 release and also fix the README
2015-09-17 14:41:32 +02:00
holger krekel
f4bfd571ee
re-vendor pluggy to 0.3.1 release and also fix the README
2015-09-17 13:54:23 +02:00
holger krekel
baf5b5d005
update changelog/author info, bump version number
2015-09-17 13:43:39 +02:00
holger krekel (rather uses bitbucket/hpk42)
3bcda48ba4
Merge pull request #1009 from mdboom/deprecation-warnings
...
avoid deprecation warnings, introduce helpers.
2015-09-17 13:37:26 +02:00
holger krekel
7eb1211192
revert setuptools_scm addition introduced with f22d14b105
2015-09-17 12:58:04 +02:00
Florian Bruhin
f978b545c5
Merge pull request #1016 from hpk42/importappend3
...
revert importing test module behaviour to prepend by default
2015-09-17 12:41:28 +02:00
holger krekel
6192e74f03
remove __init__.py as advised by ronny
2015-09-17 10:51:03 +02:00
holger krekel
a62d12634c
revert importing test module behaviour to prepend by default
2015-09-16 22:12:20 +02:00
holger krekel (rather uses bitbucket/hpk42)
886ac82c43
Merge pull request #1013 from nicoddemus/issue1010
...
Make tmpdir more resilient in case environment variables required by getpass are missing
2015-09-16 21:57:44 +02:00
Florian Bruhin
2575053697
Merge pull request #1015 from hpk42/cache-integration
...
refined pytest-cache integration
2015-09-16 21:46:46 +02:00
Bruno Oliveira
130e6cf8a2
Use temproot as a fallback if the current user couldn't be obtained
2015-09-16 16:42:07 -03:00
holger krekel
45065e4e2e
refine command line option naming and docs
2015-09-16 20:41:22 +02:00
Bruno Oliveira
1150e87e31
Extract get_user logic into a separate function
2015-09-16 12:47:50 -03:00
Bruno Oliveira
6676aeda5a
Make tmpdir more resilient in case environment variables required by getpass are missing
...
Fix #1010
2015-09-16 12:20:07 -03:00
Michael Droettboom
bf74401fd3
Use __code__.co_argcount
2015-09-16 11:05:54 -04:00
Michael Droettboom
08a572086b
Fix lookup of special values
2015-09-16 11:02:36 -04:00
Michael Droettboom
9c19728d2b
Fix checking for args
2015-09-16 06:45:51 -04:00
Michael Droettboom
859259ddae
Simplify
2015-09-16 06:43:16 -04:00
Michael Droettboom
a0cefb3213
Use inspect.signature instead of inspect.getargspec
2015-09-16 06:33:53 -04:00
holger krekel
fdd23878ec
Merge latest changes from branch 'pytest-2.7'
...
Conflicts:
_pytest/__init__.py
doc/en/fixture.rst
setup.cfg
testing/test_runner.py
2015-09-16 09:26:55 +02:00
holger krekel
5af262daa3
fix flakes problem, configure devpi upload to always upload wheels and sdist
2015-09-15 12:28:09 +02:00
holger krekel
16720b96b4
fix a few issues with pytest-2.7 branch and bump version number
...
- importorskip: skip a test if we have a minversion but cannot parse
version numbers due to pkg_resources not present
- make runner tests work with latest xdist
2015-09-15 12:17:52 +02:00
Bruno Oliveira
b2b003dcac
Merge pull request #1001 from RonnyPfannschmidt/exitcode-refactor
...
restrucure pytest.main.wrap_session to allow for non-testrun wraps
2015-09-14 15:56:04 -03:00
Ronny Pfannschmidt
81018f1996
restrucure pytest.main.wrap_session to allow for non-testrun wraps
2015-09-14 18:34:29 +02:00
Bruno Oliveira
a13f23d218
Merge branch 'master' into vendor-pluggy
2015-09-14 12:22:18 -03:00
Ronny Pfannschmidt
2cfc183029
monkeypatch: ensure the internal _savesyspath attribute always exists
2015-09-14 07:42:23 +02:00
Ronny Pfannschmidt
e0645564fe
more pep8 fixes
2015-09-13 21:49:01 +02:00
Ronny Pfannschmidt
1e107e6bd1
restrucure pytest.main.wrap_session to allow for non-testrun wraps
2015-09-13 19:55:44 +02:00
Ronny Pfannschmidt
2e87cf4a62
create the previously missing cache fixture
...
there was a disabled test
2015-09-13 19:55:44 +02:00
Ronny Pfannschmidt
e035f57535
s/--cache/--show-cache/
2015-09-13 19:55:44 +02:00
Ronny Pfannschmidt
e20216a1a8
merge the pytest-cache plugin into core
2015-09-13 19:55:44 +02:00
Bruno Oliveira
41d2faccea
Merge branch 'issue_960' of https://github.com/Akasurde/pytest
2015-09-12 10:57:23 -03:00
Abhijeet Kasurde
dd69394598
Added testcase and help for report option
...
Fix added to show help of new reporting option 'a'.
Also, added testcase for checking reporting functionality
with option 'a'.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-09-11 12:24:45 +05:30
Abhijeet Kasurde
c40947e651
Added fix for specifying every option for reporting
...
The fix will add option 'a' to reporting which will ease task of
adding all options or reporting at once.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-09-10 15:43:43 +05:30
Bruno Oliveira
b6f876e721
Fix --target parameter for pip install
2015-09-07 14:13:41 -03:00
Bruno Oliveira
5a1c679f78
Keep *dist-info directory on vendored_packages
2015-09-07 14:09:59 -03:00
Bruno Oliveira
0b3f1b4a7c
Create `_pytest.vendored_packages` and _pytest._pluggy
...
- Replace imports from "pluggy" to "_pytest._pluggy"
- Fallback to import "pluggy" from global namespace if
not found in _pytest.vendored_packges
2015-09-07 13:01:54 -03:00
Bruno Oliveira
8625eb643e
Merge pull request #986 from RonnyPfannschmidt/early-logging
...
replay initial warnings when terminalreporter is loaded
2015-09-02 19:10:53 -03:00
Ronny Pfannschmidt
76f0988551
turn the pytest_logwarning hook historic
2015-09-02 18:49:49 +02:00
Ronny Pfannschmidt
348e519437
Merge pull request #962 from nicoddemus/doctest-skip
...
Make doctest SKIP option register doctests as SKIPPED rather than PASSED
2015-09-01 12:31:35 +02:00
Ronny Pfannschmidt
7292212d5a
Merge pull request #976 from nicoddemus/ren-warnings-on-terminal
...
Rename "warnings" to "pytest-warnings" in terminal output
2015-09-01 07:56:42 +02:00
Bruno Oliveira
4ad56e84a8
Make doctest SKIP option register doctests as SKIPPED rather than PASSED
...
Fix 957
2015-08-31 21:25:11 -03:00
Bruno Oliveira
06a70b6d6d
Merge pull request #982 from codewarrior0/patch-1
...
Add notes to docstring of `monkeypatch.undo()`
2015-08-31 21:18:53 -03:00
Ronny Pfannschmidt
3fa261564b
replay initial warnings when terminalreporter is loaded
2015-08-31 21:54:12 +02:00
Florian Bruhin
885e461ae3
Fix overriding of fixtures with parametrization.
...
Fixes #979 , see #926 .
2015-08-31 14:38:39 +02:00
David Vierra
3a27cd87ce
Adjust phrasing in monkeypatch.undo docstring
...
s/test invocation/test function invocation/
2015-08-29 19:00:00 -10:00
David Vierra
6380e19f07
Add notes to docstring of `monkeypatch.undo()`
...
Note that calling `undo()` is generally not needed, and describe the "gotcha" discovered in #981 .
2015-08-29 16:53:57 -10:00
Bruno Oliveira
c0eec5d61c
Merge pull request #975 from nicoddemus/fix-regression-parse-known-args
...
Fix regression caused by changing the signature for parse_known_args
2015-08-29 23:44:32 -03:00
Brianna Laugher
c493f263b6
Merge branch 'Elizaveta239-master' closes #908
2015-08-29 17:34:35 +10:00
Bruno Oliveira
dd7112d5ea
Show a few diff lines when truncating string diffs
...
Fix #934
2015-08-27 22:20:13 -03:00
Bruno Oliveira
e59471766a
Rename "warnings" to "pytest-warnings" in terminal output
...
Fix #970
2015-08-27 19:59:52 -03:00
Bruno Oliveira
4533a50542
Fix regression caused by changing the signature for parse_known_args
...
Fix #973
2015-08-27 19:35:32 -03:00
Bruno Oliveira
ccf7584fac
Add warning about implementing pytest_addoption from conftest files
2015-08-27 19:14:56 -03:00
Bruno Oliveira
42b43a7d7b
Paths after normal options are now properly used to discover rootdir and ini files
...
Fix #949
2015-08-25 22:08:05 -03:00
elizabeth
e67d66a5d4
Merge branch 'pytest-dev'
...
# Conflicts:
# AUTHORS
2015-08-24 22:55:11 +03:00
Ronny Pfannschmidt
b25e41e348
Merge pull request #956 from nicoddemus/record-xml-property
...
add preliminary support for extended junit xml properties
2015-08-24 09:13:04 +02:00
Bruno Oliveira
70da93145d
Improve docs and using warning system for record_xml_property fixture
2015-08-23 11:56:27 -03:00
elizabeth
06585f5bdd
Always report error about parametrize data that doesn't correspond to fixtures in test functions.
2015-08-23 13:42:40 +03:00
David Diaz
2ddbac1f98
Correcting implementation based on pull request feed back
2015-08-21 14:31:53 -06:00
Ronny Pfannschmidt
287df16c9c
Merge pull request #817 from nicoddemus/non-collection-exit-error
...
return non-zero exit code if no tests are collected
2015-08-21 18:30:57 +02:00
David Diaz
24212fd97f
Add support to record custom properties on xml output
2015-08-20 17:55:38 -06:00
Bruno Oliveira
f730291904
Make testsfailed and testscollected public Session attributes
...
As suggested by @flub in review
2015-08-18 07:35:02 -03:00
Bruno Oliveira
2ffd37b816
return non-zero exit code if no tests are collected
...
Fix #812
Fix #500
2015-08-18 07:35:02 -03:00
Ronny Pfannschmidt
7758bcd141
terminalwriter: extract plugin printing logic and add positive unittests
2015-08-17 09:10:01 +02:00
Ronny Pfannschmidt
740a97a8cc
terinalwriter: use dash between plugin name and version
2015-08-17 08:48:38 +02:00
Ronny Pfannschmidt
2c42f15e00
adapt plugin printing
...
* print each distribution only once(xdist now has 3 entrypoints)
* include the distribution version
2015-08-17 08:41:24 +02:00
Ronny Pfannschmidt
37ed391cc2
Merge pull request #938 from nicoddemus/doctest-unicode
...
New ALLOW_UNICODE doctest option
2015-08-16 11:35:10 +02:00
Floris Bruynooghe
f22d14b105
Merge pull request #879 from RonnyPfannschmidt/setuptools-scm
...
use setuptools_scm to determine the version
2015-08-15 00:56:16 +01:00
Bruno Oliveira
d749021a31
Fix coverage
...
Also make sure a test that doesn't set ALLOW_UNICODE fails
on Python 2 and passes Python 3.
2015-08-12 22:49:41 -03:00
Bruno Oliveira
420823070b
Add ALLOW_UNICODE doctest option
...
When enabled, the ``u`` prefix is stripped from unicode strings in
expected doctest output. This allows doctests which use unicode
to run in Python 2 and 3 unchanged.
Fix #710
2015-08-12 22:16:44 -03:00
Markus Unterwaditzer
41cef6f5f2
Don't skip fixtures that are substrings of params
...
Bug introduced with
https://bitbucket.org/pytest-dev/pytest/pull-requests/257/allow-to-override-parametrized-fixtures
Fix #736
2015-08-11 00:41:21 +02:00
Bruno Oliveira
e103932aad
Reintroduce hasplugin to PytestPluginManager
...
Fix #932
2015-08-09 19:30:49 -03:00
TomV
353360dbe5
use local isclass
2015-08-09 00:11:15 +01:00
TomV
3497aa0766
check nose.istest __test__ attr issue526
2015-08-09 00:11:15 +01:00
Bruno Oliveira
729b5e9b2f
Merge pull request #923 from The-Compiler/parametrize-idfunc
...
Generate parametrize IDs for enum/re/class objects.
2015-08-08 15:09:54 -03:00
Florian Bruhin
4e21d1d77b
Move enum import and adjust comments.
2015-08-08 15:25:10 +02:00
Florian Bruhin
84fdba129a
More style changes.
2015-08-08 12:57:54 +02:00
Florian Bruhin
18125c7d1f
Clean up type comparisons.
2015-08-07 23:10:22 +02:00
Florian Bruhin
b59376bea4
Alert user about other parametrize spellings.
2015-08-07 07:51:59 +02:00
Florian Bruhin
13c5456868
Generate parametrize IDs for enum/re/class objects.
2015-08-07 07:37:59 +02:00
Eric Hunsberger
39f1471e93
Warnings always raised in WarningsRecorder
...
This ensures that if tests for warnings are run more than once,
the warning is still raised as expected.
2015-08-06 15:05:01 -04:00
elizabeth
f7bacd169e
Update docs
2015-08-04 00:48:41 +03:00
elizabeth
657ca97dbd
Some refactorings after code review
2015-08-04 00:02:03 +03:00
elizabeth
9846953597
Support for python 2.6
2015-08-02 17:28:27 +03:00
elizabeth
2fc7aede0b
Request #714 : Apply indirect=True on particular argnames
2015-08-02 16:40:40 +03:00
Eric Hunsberger
52b4eb6c46
Added `warns` to assert warnings are thrown
...
Works in a similar manner to `raises`, but for warnings instead
of exceptions. Also refactored `recwarn.py` so that all the
warning recording and checking use the same core code.
2015-07-30 23:28:32 -04:00
Bruno Oliveira
4302972c23
Use pytest-of-$user as base directory for tmpdir_factory
...
Before tmpdir_factory, pytest used to create a link named "pytest-$user" to the current numbered directory. Use
a different name so there's no conflict when running different pytest versions.
Fix #894
2015-07-28 20:57:48 -03:00
Ronny Pfannschmidt
235f9da432
special-case _pytest.__init__ in genscript to avoid a python3 bug
2015-07-27 11:33:27 +02:00
jakubo
e8f4819876
Test file run twice fails if it contains marked class #683
2015-07-26 12:15:29 +02:00
Floris Bruynooghe
e68fa641ff
Merge reset-capgture-on-reeadouterr-errors
...
Merge branch 'reset-capture-on-readouterr-errors' of github.com:davidszotten/pytest into merge-capmerge
2015-07-26 11:39:03 +02:00
David Szotten
983d249680
reset capture even if readouterr throws
...
otherwise that exception (and all following output) end up in /dev/null
2015-07-26 01:15:51 +02:00
Floris Bruynooghe
f64d5f1209
Merge pull request #884 from cpommranz/deprecate_genscript
...
Deprecate and warn about --genscript, fixes #730
2015-07-25 19:09:52 +02:00
Floris Bruynooghe
251fc68ef9
Merge fix for #751
...
Merge branch 'fix-751' of github.com:JanBednarik/pytest into jb-fix-751
2015-07-25 19:03:44 +02:00
Jan Bednařík
9906a19e29
Issue #751 - fix.
2015-07-25 15:38:27 +02:00
Christian Pommranz
00e1a2122a
Deprecate and warn about --genscript, fixes #730
2015-07-25 15:10:22 +02:00
Floris Bruynooghe
80ee620459
Merge pull request #881 from maartenq/master
...
setuptools not present issue deprecating gentest
2015-07-25 15:03:50 +02:00
Floris Bruynooghe
023687d8d0
Merge pull request #872 from nicoddemus/confcutdir-inifile
...
Avoid detecting conftest files upwards from setup.cfg/pytest.ini/tox.ini by default
2015-07-25 14:03:24 +02:00
Maarten
e3d60024aa
setuptools not present issue deprecating gentest
2015-07-25 13:50:40 +02:00
Ronny Pfannschmidt
a060b8ff73
use setuptools_scm to determine the version
2015-07-25 10:44:18 +02:00
Bruno Oliveira
033def0a7a
Workaround for cmdexec bug on Windows
...
This bug fails the entire pytest suite when executed with the
--lsof option in Python 2 on Windows.
2015-07-24 19:24:31 -03:00
Bruno Oliveira
9f94e443ff
Merge remote-tracking branch 'upstream/pytest-2.7'
...
Conflicts:
testing/conftest.py
2015-07-24 19:24:21 -03:00
Bruno Oliveira
91e8e59cea
Merge pull request #860 from nicoddemus/warn-plugins-as-str-main
...
Make passing plugins as str objects a more obvious failure
2015-07-24 19:13:39 -03:00
Eric Hunsberger
d104487282
importorskip: Allow non-integer version strings
...
Use `pkg_resources.parse_version` to parse version strings.
This can handle 'dev', 'rc', alpha and beta version strings,
among others.
2015-07-24 12:34:06 -04:00
Bruno Oliveira
35bbcc39a2
Interpret strings to "plugins" arg in pytest.main() as module names
...
See #855
2015-07-23 23:37:09 -03:00
Bruno Oliveira
ab9e246ab0
Avoid detecting conftest files upwards from setup.cfg/pytest.ini/tox.ini files by default
...
As discussed in #82
2015-07-23 23:21:07 -03:00
Bruno Oliveira
df29120abe
Merge branch 'pytest-2.7'
...
Conflicts:
_pytest/config.py
_pytest/genscript.py
_pytest/mark.py
tox.ini
2015-07-23 22:35:51 -03:00
Bruno Oliveira
ce96973ed5
Merge pull request #864 from pytest-dev/consider-color-yes-everywhere
...
Consider --color option in more places which deal with TerminalWriters
2015-07-23 08:03:52 -03:00
Floris Bruynooghe
0e26de2218
Merge pull request #867 from nicoddemus/autouse-yield-fixture-class
...
Fix autouse fixtures defined in a TestCase subclass
2015-07-22 01:25:21 +02:00
Bruno Oliveira
81f18f8a0f
Fix flakes
2015-07-21 19:55:01 -03:00
Bruno Oliveira
0769bb4898
Make pastebin use _pytest.config.create_terminal_writer
2015-07-21 12:55:18 -03:00
Bruno Oliveira
31cfbac1f4
Fix autouse fixtures defined in a TestCase subclass
2015-07-20 19:28:54 -03:00
Anatoly Bubenkov
6af7172204
Merge branch 'pytest-2.7'
2015-07-19 15:25:04 +02:00
Bruno Oliveira
de65737cb1
Fix flakes
2015-07-18 18:23:17 -03:00
Bruno Oliveira
953916df49
Report correct reason when using multiple skip/xfail markers
2015-07-18 18:18:45 -03:00
Bruno Oliveira
2f7d0f8bd9
Consider --color option in more places which deal with TerminalWriters
2015-07-18 16:39:55 -03:00
Thomas Kluyver
e227950b06
Style fix
2015-07-18 13:18:38 -03:00
Thomas Kluyver
d4789f1ac4
Fix AST rewriting with starred expressions in function calls
2015-07-18 13:16:47 -03:00
Thomas Kluyver
26e7532756
Move Interrupted exception class out of Session
2015-07-18 13:16:47 -03:00
Thomas Kluyver
570c4cc55a
No Starred node type on Python 2
2015-07-18 13:16:46 -03:00
Matthias Bussonnier
728d8fbdc5
generify
2015-07-18 13:16:26 -03:00
Matthias Bussonnier
fad569ae1b
simplify + fix
2015-07-18 13:16:26 -03:00
Matthias Bussonnier
a4dbb27fab
a test
2015-07-18 13:16:26 -03:00
Matthias Bussonnier
b18e6439bd
Ast Call signature changed on 3.5
...
fix issue 744 on bitbucket
port of merge request 296
https://bitbucket.org/pytest-dev/pytest/pull-request/296/astcall-signature-changed-on-35
https://bitbucket.org/pytest-dev/pytest/issue/744/
Conflicts:
CHANGELOG
2015-07-18 13:15:46 -03:00
Floris Bruynooghe
5e0235946b
Merge pull request #801 from Carreau/test-35
...
Support Python 3.5
2015-07-18 11:30:36 +01:00
Bruno Oliveira
a7b4ed89da
Use functools.partial name explicitly and simplify the code a bit as asked in review
2015-07-16 20:37:04 -03:00
Bruno Oliveira
dcdc823dd2
Support for tests created with functools.partial
...
Fix #811
2015-07-16 20:37:03 -03:00
Bruno Oliveira
330de0a93d
Use a subdirectory in the TEMP directory to speed up tmpdir creation
...
Fix #105
2015-07-16 19:50:49 -03:00
Bruno Oliveira
aa25fb05a9
Make sure marks in subclasses don't change marks in superclasses
...
Fix #842
2015-07-16 19:29:16 -03:00
Thomas Kluyver
4462b83258
Style fix
2015-07-16 11:04:36 -07:00
Bruno Oliveira
0f52856f99
Use a subdirectory in the TEMP directory to speed up tmpdir creation
...
Fix #105
2015-07-15 20:03:58 -03:00
Thomas Kluyver
195422f9c0
Fix AST rewriting with starred expressions in function calls
2015-07-15 15:31:35 -07:00
Thomas Kluyver
62ca4ae963
Move Interrupted exception class out of Session
2015-07-15 14:28:43 -07:00
Thomas Kluyver
35bea86c9f
No Starred node type on Python 2
2015-07-15 14:11:21 -07:00
Matthias Bussonnier
d774f3ca86
generify
2015-07-15 13:49:40 -07:00
Matthias Bussonnier
167625d24d
simplify + fix
2015-07-15 13:49:40 -07:00
Matthias Bussonnier
3bc6c0f936
a test
2015-07-15 13:49:40 -07:00
Matthias Bussonnier
26e64fc45c
Ast Call signature changed on 3.5
...
fix issue 744 on bitbucket
port of merge request 296
https://bitbucket.org/pytest-dev/pytest/pull-request/296/astcall-signature-changed-on-35
https://bitbucket.org/pytest-dev/pytest/issue/744/
2015-07-15 13:49:40 -07:00
Bruno Oliveira
d6033037ac
Consider session fixtures for doctest docstrings in modules
...
Fixes #768
2015-07-13 12:29:09 -03:00
Bruno Oliveira
5ec2a17f08
--fixtures only shows fixtures from first file
...
Fix #833
2015-07-12 17:32:39 -03:00
Bruno Oliveira
7445c5bd70
Add support for PEP302 get_data API
...
Fix #808
2015-07-11 14:13:43 -03:00
Bruno Oliveira
1baa1a4d01
Merge pull request #822 from nicoddemus/extra-usage-info
...
Print inifile and rootdir when there's usage errors
2015-07-11 13:43:20 -03:00
Bruno Oliveira
8a6aa5e17e
Print inifile and rootdir when there's usage errors
...
Related to #821
2015-07-10 21:56:12 -03:00
Bruno Oliveira
854e603f84
Add new testdirs ini option
...
Fix #694
2015-07-10 21:52:47 -03:00
Bruno Oliveira
0ee3ee7333
Add syntax highlighting to missing snippets in the documentation and other fixes
...
- Add explicit "code-block" for sessions without syntax highlight
- Moved Metafunc documentation to the class docstring and reused that in the
docs;
2015-07-09 21:50:38 -03:00
Bruno Oliveira
ae4c8b8635
Merge pull request #787 from pytest-dev/pluggy-bc-fix
...
Reintroduce get_plugin_manager() for backward-compatibility
2015-07-08 19:28:01 -03:00
Bruno Oliveira
d10054a38d
Merge branch 'esiegerman/summary_colors' of github.com:esiegerman/pytest
2015-07-03 18:29:17 -03:00
Kevin Cox
7fa27af408
Add `file` and `line` attributes to junit-xml output.
...
This adds the `file` and `line` attributes to the junit-xml output
which can be used by tooling to identify where tests come from. This can be
used for many things such as IDEs jumping to failures and test
runners evenly balancing tests among multiple executors.
Update test_junitxml.py
Foo.
2015-07-02 18:41:52 -04:00
Eric Siegerman
6c395cb58c
Default color is now yellow
...
Passing tests override that default, making the color green; but several other
"boring" statuses (xfailed, xpassed, deselected, skipped) have no effect.
Net effect: if only "boring" tests are seen, or no tests at all, the summary
bar is yellow.
2015-07-02 13:39:05 -04:00
Eric Siegerman
044d874c5b
If there are warnings, make the status bar yellow
...
Also if we see any statuses the code doesn't know about.
2015-07-02 13:39:05 -04:00
Eric Siegerman
cb21d844d9
Add missing "error" status to the list
2015-07-02 13:39:05 -04:00
Eric Siegerman
0282da9ddf
Refactor slightly
...
Check for the empty-key special case in the first loop,
not the second.
2015-07-02 13:39:05 -04:00
Eric Siegerman
bfc3e48fd5
Factor out build_summary_stats_line(), and add tests
...
--HG--
branch : esiegerman/summary_colors
2015-07-02 13:39:04 -04:00
Pieter Mulder
89b00d714f
deprecated_call dit not revert functions back to original
...
Make sure that the warnings.warn and warnings.warn_explicit are reverted
to there original function after running the function in deprecated_call
2015-06-25 17:11:50 +02:00
Bruno Oliveira
3c2fd833ca
Reintroduce get_plugin_manager() for backward-compatibility
...
PyCharm pytest runner depends on this function existing (see #787 ).
Added reference to get_plugin_manager() and PluginManager/PytestPluginManager to docs
2015-06-25 00:48:47 -03:00
holger krekel (rather uses bitbucket/hpk42)
08613b621e
Merge pull request #799 from pytest-dev/noconftest
...
Add a --noconftest option.
2015-06-23 16:53:22 +02:00
holger krekel
ee40ea5f6d
Merge branch 'pytest-2.7'
...
Conflicts:
AUTHORS
_pytest/__init__.py
setup.py
testing/conftest.py
tox.ini
2015-06-23 16:49:05 +02:00
Florian Bruhin
f78b6df8bc
Return an empty list directly.
2015-06-23 14:05:44 +02:00
Florian Bruhin
8664fc4102
Add a --noconftest option.
2015-06-23 09:38:54 +02:00
holger krekel
cdd25c9512
bump version to 2.7, depend on py-1.4.29
2015-06-22 23:53:41 +02:00
holger krekel (rather uses bitbucket/hpk42)
080dfb9841
Merge pull request #788 from pytest-dev/issue-767
...
Fix issue where pytest.raises() doesn't always return Exception instance in py26
2015-06-19 13:41:44 +02:00
Edison Gustavo Muenz
48d91def7e
Added workaround to still show the diff on containers with unsortable elements.
...
fix issue #718
2015-06-19 07:51:59 -03:00
Bruno Oliveira
eb73db56c7
Fix issue where pytest.raises() doesn't always return Exception instance in py26
...
Fixes #767
2015-06-19 07:46:47 -03:00
holger krekel
13c01193d6
Merge remote-tracking branch 'origin/pytest-2.7'
2015-06-19 10:03:37 +02:00
Bruno Oliveira
f90b2f845c
unittest.SkipTest now reports original function location
...
Fix #748
2015-06-18 22:27:43 -03:00
Bruno Oliveira
9d4e0365da
Skipif marker report now refers to the skipped function
...
Fix #114
2015-06-18 21:59:44 -03:00
Anatoly Bubenkov
4d6fef36f4
Merge branch 'pytest-2.7'
2015-06-17 13:42:41 +02:00
Bruno Oliveira
2653024409
Use os.path.isdir instead of os.path.exists
...
As suggested during review
2015-06-17 08:08:03 -03:00
Bruno Oliveira
2a1424e563
Merge branch 'pytest-2.7' of github.com:curzona/pytest into pytest-2.7
...
Conflicts:
AUTHORS
CHANGELOG
2015-06-17 00:02:26 -03:00
curzona
1db5c95414
Automatically create directory for results
2015-06-16 19:30:19 -07:00
Punyashloka Biswal
0c05b906d4
backport fix for #713
2015-06-16 21:27:22 -03:00
Punyashloka Biswal
0b0406fa85
Handle reports that don't have a reprcrash
...
Closes #713 (which happens because ReprFailDoctest
doesn't have a reprcrash)
2015-06-16 18:53:20 -04:00
Bruno Oliveira
b40f760cc3
Change links from bitbucket to GitHub
2015-06-15 18:28:31 -03:00
Ronny Pfannschmidt
8ee73e028f
Merged in jpvanhal/pytest/include-setup-teardown-duration-in-junitxml (pull request #287 )
...
Include setup and teardown in junitxml test durations
2015-06-06 11:50:37 +02:00
holger krekel
ca44e88e54
backport fixed issue735
...
--HG--
branch : pytest-2.7
2015-06-04 07:52:25 +02:00
Benjamin Peterson
f3ad2e4ad2
use NameConstant node when it exists ( fixes #735 )
...
--HG--
branch : issue735
2015-06-03 18:07:10 -05:00
holger krekel
584cccf7ec
Merged in nicoddemus/pytest/issue-741-pytester-output (pull request #293 )
...
Make "running" output from testdir.run copy/pastable
2015-06-03 23:40:08 +02:00
holger krekel
ad08bf79e7
Merged in The-Compiler/pytest (pull request #298 )
...
Fix monkeypatch.setenv with string and raising=False.
2015-06-03 23:37:26 +02:00
Floris Bruynooghe
d220be8468
Use platform.python_version() to show Python version number
...
This results in something like "3.5.0b2" for non-final releases
while still being "3.5.0" for final releases.
2015-05-31 20:31:31 +01:00
Florian Bruhin
ff8d787cd5
Fix monkeypatch.setenv with string and raising=False.
...
Fixes #746 .
2015-05-19 22:59:49 +02:00
Floris Bruynooghe
504b6b72a9
Set 2.7.1 version number
...
--HG--
branch : pytest-2.7
2015-05-19 01:50:32 +01:00
Bruno Oliveira
a7f880fa1f
Make "running" output from testdir.run copy/pastable
...
fix 741
--HG--
branch : issue-741-pytester-output
2015-05-09 10:24:33 -03:00
holger krekel
d9a44098ce
use new pluggy api (now at 0.3.0) for adding hookcall monitoring
...
and reraise real keyboard interrupts during inline pytest runs
to allow for better stopping of the pytest tests.
--HG--
branch : plug30
2015-05-07 11:02:55 +02:00
holger krekel
bb8141e27c
- make sure sub pytest runs use the same basetemp
...
- depend on pluggy < 0.3
--HG--
branch : pluggy1
2015-05-06 14:58:46 +02:00
holger krekel
bddc88f09e
adapt to pluggy naming, rename pytest.hookspec_opts to pytest.hookspec,s ame with hookimpl_opts
...
--HG--
branch : pluggy1
2015-05-06 10:08:08 +02:00
holger krekel
23538bcd31
- some more adaptation to most recent pluggy API
...
- avoid using pluggin underscore api
- show pluggy version in header
--HG--
branch : pluggy1
2015-05-05 21:53:04 +02:00
holger krekel
a4f2236b36
merge default
...
--HG--
branch : pluggy1
2015-05-05 14:52:16 +02:00
holger krekel
88538f13ba
adapt for current API changes of pluggy
...
--HG--
branch : pluggy1
2015-05-04 15:08:41 +02:00
holger krekel
920b5afe45
now that we are going to have wheels, py source code might be not be installed
...
and the resulting genscript is useless
--HG--
branch : pluggy1
2015-05-04 14:42:01 +02:00
Janne Vanhala
93628fc0eb
Include setup and teardown in junitxml test durations
...
--HG--
branch : include-setup-teardown-duration-in-junitxml
2015-05-01 14:55:52 +03:00
famousgarkin
47936643c9
monkeypatch.chdir docstring punctuation
...
--HG--
branch : famousgarkin/monkeypatchchdir-docstring-punctuation-1430453576841
2015-05-01 04:13:06 +00:00
Floris Bruynooghe
aa2ffb9805
Merge fix for issue 731 from pytest-2.7
2015-04-30 21:13:03 +01:00
Floris Bruynooghe
7f554f50e3
Fix collapse false to look at unescaped braces only
...
Sometimes the repr of an object can contain the "\n{" sequence which is
used as a formatting language, so they are escaped to "\\n{". But the
collapse-false code needs to look for the real "\n{" token instead of
simply "{" as otherwise it may get unbalanced braces from the object's
repr (sometimes caused by the collapsing of long reprs by saferepr).
Fixes issue #731 .
--HG--
branch : pytest-2.7
2015-04-30 02:31:12 +01:00
holger krekel
25963e0544
adapt pytest to pluggy's decoratorclass branch
...
--HG--
branch : pluggy1
2015-04-29 16:40:52 +02:00
holger krekel
5ee7ee0850
adapt pytest to using pluggy (current master)
...
--HG--
branch : pluggy1
2015-04-29 16:40:51 +02:00
holger krekel
db5649ec6a
streamline pytester API majorly:
...
- integrate conftest into pytester plugin
- introduce runpytest() to either call runpytest_inline (default) or
runpytest_subprocess (python -m pytest)
- move testdir.inline_runsource1 to pdb tests
- strike some unneccessary methods.
- a new section "writing plugins" and some better pytester docs
--HG--
branch : testrefactor
2015-04-28 11:54:53 +02:00
holger krekel
a8afba054a
- refine lsof checking
...
- make runpytest() create an inline testing process instead of
a subprocess one
--HG--
branch : testrefactor
2015-04-28 11:54:46 +02:00
holger krekel
d3e363b97a
- make API between runpytest() and inline_run() more similar
...
- shift a number of tests to become inline_run() tests
--HG--
branch : testrefactor
2015-04-28 11:54:45 +02:00
holger krekel
424e5d1394
make test suite more tolerable against xdist causing warnings itself (which it does
...
currently)
--HG--
branch : plugtestfix
2015-04-27 15:06:47 +02:00
holger krekel
b2d66b9e7b
simplify load_setuptools_entrypoints and refine comments/docstrings
...
--HG--
branch : more_plugin
2015-04-27 14:10:33 +02:00
holger krekel
c54afbe42e
deprecate and warn about __multicall__ usage in hooks, refine docs about hook ordering,
...
make hookwrappers respect tryfirst/trylast
--HG--
branch : more_plugin
2015-04-27 12:50:34 +02:00
holger krekel
dea1c96031
actually revert back to using older simpler method for subset hook
...
calling. It is slightly more inefficient but easier to implement and
read.
--HG--
branch : more_plugin
2015-04-26 17:17:59 +02:00
holger krekel
d2ea7387f2
re-add tryfirst/trylast marker documentation, mark it as to be removed
...
--HG--
branch : more_plugin
2015-04-26 00:47:24 +02:00
holger krekel
8e009ee31c
move consider_setuptools_entrypoints to core pluginmanager
...
--HG--
branch : more_plugin
2015-04-26 00:41:29 +02:00
holger krekel
0c961deeaa
fix some doc strings
...
--HG--
branch : more_plugin
2015-04-26 00:22:34 +02:00
holger krekel
32165d82b1
introduce a new subset_hook_caller instead of remove make_hook_caller
...
and adapat and refine conftest/global plugin management accordingly
--HG--
branch : more_plugin
2015-04-26 00:10:52 +02:00
holger krekel
d422247433
specialize make_hook_caller to work with a subset of the registered plugins.
...
--HG--
branch : more_plugin
2015-04-25 22:13:42 +02:00
holger krekel
a042c57227
ensure proper get_name references
...
--HG--
branch : more_plugin
2015-04-25 20:42:41 +02:00
holger krekel
3a1374e69c
simplify plugins bookkeeping further, refine API
...
--HG--
branch : more_plugin
2015-04-25 20:17:32 +02:00
holger krekel
1c0582eaa7
simplify addition of method and scanning of plugins
...
--HG--
branch : more_plugin
2015-04-25 18:15:42 +02:00
holger krekel
1e883f5979
simplify tracing mechanics by simply going through an indirection
...
--HG--
branch : more_plugin
2015-04-25 18:15:39 +02:00
holger krekel
9c5495832c
avoid direct circular reference between config and pluginmanager
...
--HG--
branch : more_plugin
2015-04-25 18:14:41 +02:00
holger krekel
7364647f2f
fix issue732: make sure removed plugins remove all hook callers.
...
--HG--
branch : more_plugin
2015-04-25 18:14:39 +02:00
holger krekel
4e116ed503
make pytest_plugin_registered a historic hook
...
--HG--
branch : more_plugin
2015-04-25 13:38:30 +02:00
holger krekel
e7a2e53108
Streamline data structures
...
--HG--
branch : more_plugin
2015-04-25 13:38:29 +02:00
holger krekel
2f8a1aed6e
properly perform hook calls with extra methods
...
--HG--
branch : more_plugin
2015-04-25 11:29:11 +02:00
holger krekel
a63585dcab
introduce historic hook spec which will memorize calls to a hook
...
in order to call them on later registered plugins
--HG--
branch : more_plugin
2015-04-25 11:29:11 +02:00
holger krekel
d2a5c7f99b
add documented hookimpl_opts and hookspec_opts decorators
...
so that one doesn't have to use pytest.mark or function-attribute setting anymore
--HG--
branch : more_plugin
2015-04-25 11:29:11 +02:00
holger krekel
bbbb6dc2e3
remove _do_register indirection between PluginManager and PytestPluginManager
...
--HG--
branch : more_plugin
2015-04-25 11:29:11 +02:00
holger krekel
f41528433b
also incrementally remove plugins from hook callers
...
--HG--
branch : more_plugin
2015-04-25 11:29:11 +02:00
holger krekel
02a4042dca
incrementally update hook call lists instead of regenerating the whole
...
list on each registered plugin
--HG--
branch : more_plugin
2015-04-25 11:29:11 +02:00
holger krekel
b03c1342ac
allow to register plugins with hooks that are only added later
...
--HG--
branch : more_plugin
2015-04-25 11:29:11 +02:00
holger krekel
9020bf48b7
remove useless check
...
--HG--
branch : plugin_no_pytest
2015-04-24 14:09:57 +02:00
holger krekel
237ac8562f
minimize HookCaller attributes: avoid passing in hookrelay to HookCallers
...
--HG--
branch : plugin_no_pytest
2015-04-24 13:02:49 +02:00