Daniel Hahler
fc4aa27cae
Derive outcomes.exit.Exception from SystemExit instead of KeyboardInterrupt
...
This is required for properly getting out of pdb, where
KeyboardInterrupt is caught in py36 at least.
Ref: https://github.com/pytest-dev/pytest/issues/1865#issuecomment-242599949
2018-12-11 04:22:33 +01:00
Daniel Hahler
0db5ccb0dd
Merge master into features
2018-12-10 05:42:07 +01:00
Daniel Hahler
f3babf13ea
Ensure that PYTEST_ADDOPTS are valid by themselves
...
Fixes https://github.com/pytest-dev/pytest/issues/4265 .
2018-12-09 21:57:10 +01:00
Daniel Hahler
8a0ed7e2b3
Revisit changelog entry [ci skip]
2018-12-05 19:14:41 +01:00
Daniel Hahler
62b8f2f731
Update changelog [ci skip]
2018-12-05 19:07:10 +01:00
Tomer Keren
41031fce2f
Address code review
2018-12-05 17:18:57 +02:00
Tomer Keren
b7a64d6729
Create changelog file for 1495
2018-12-05 11:29:32 +02:00
Tomer Keren
e1e4b226c6
👌 Address code review
...
Edited the changelog for extra clarity, and to fire off auto-formatting
Oddly enough, keeping `filename='{filename!r}'` caused an error while
collecting tests, but getting rid of the single ticks fixed it
Hopefully closes #3191
2018-12-05 10:52:12 +02:00
Bruno Oliveira
26d27df6fc
Improve changelog message
2018-12-05 10:41:30 +02:00
Tomer Keren
aaf7f7fcca
Update changelog
2018-12-05 10:41:30 +02:00
feuillemorte
d237197de3
#4278 Added a CACHEDIR.TAG file to the cache directory
2018-12-04 13:49:08 +01:00
Anthony Sottile
b88c3f8f82
Deprecate pytest.config
2018-12-03 09:01:42 -08:00
Pedro Algarvio
c1bdb07b2f
Fix change log entry
2018-12-03 12:17:14 +00:00
Anthony Sottile
4a3c8e22d7
Merge pull request #4491 from nicoddemus/removal-links
...
Add links to the deprecations docs for the "removal" changelog entries
2018-12-01 21:05:32 -08:00
Pedro Algarvio
f792cc420c
Add changelog entry
2018-12-01 21:40:11 +00:00
Bruno Oliveira
a131f0acf6
Merge pull request #4490 from nicoddemus/remove-cached-setup-add-call
...
Remove cached_setup and Metafunc.addcall
2018-12-01 18:44:51 -02:00
Bruno Oliveira
4ffa13728d
Add links to the deprecations docs for the "removal" changelog entries
2018-12-01 17:33:48 -02:00
Bruno Oliveira
40b85d7ee8
Remove Metafunc.addcall
...
Fix #3083
2018-12-01 16:41:59 -02:00
Bruno Oliveira
090f7ff449
Remove request.cached_setup
...
Fix #4489
2018-12-01 15:59:44 -02:00
Bruno Oliveira
b05061dcd2
Change deprecation type of --result-log to PytestDeprecationWarning
...
It was decided to deprecate this on a later date (see discussion in #4447 )
2018-12-01 14:29:50 -02:00
Ronny Pfannschmidt
7eb28f9eb7
remove yield tests and compat properties
2018-11-30 10:40:13 +01:00
Anthony Sottile
1bba0a9714
Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)')
2018-11-29 09:34:51 -08:00
Anthony Sottile
e9b2475e29
Display actual test ids in `--collect-only`
2018-11-25 09:33:18 -08:00
Daniel Hahler
5bee396e4b
Merge master into merge-master-into-features
2018-11-24 13:47:10 +01:00
Anthony Sottile
860bc50772
Merge pull request #4451 from asottile/report_correct_filename_raises_exec
...
Fix `raises(..., "code(string)")` frame filename.
2018-11-23 17:29:09 -08:00
Bruno Oliveira
33b877cc01
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-11-23 23:27:41 -02:00
Anthony Sottile
0d5298475d
Fix `raises(..., "code(string)")` frame filename.
2018-11-23 15:01:35 -08:00
Bruno Oliveira
16b15af624
Preparing release version 4.0.1
2018-11-23 20:09:57 +00:00
Daniel Hahler
0cf45ee18a
Display "short test summary info" after (main) warnings again
...
Fixes https://github.com/pytest-dev/pytest/issues/3952 .
2018-11-23 20:06:09 +01:00
Bruno Oliveira
63f90a2bcd
Merge pull request #4438 from RonnyPfannschmidt/fix-4386-raises-partial-object
...
fix #4386 - restructure construction and partial state of ExceptionInfo
2018-11-23 12:41:14 -02:00
Bruno Oliveira
0b73d6d4f5
Merge pull request #4444 from RonnyPfannschmidt/fix-4386-2
...
fix #4386 - handle uninitialized exceptioninfo in repr/str
2018-11-23 12:40:41 -02:00
Bruno Oliveira
e4ae33d592
Merge pull request #4394 from blueyed/cache-ensure-files
...
cacheprovider: do not write README/.gitignore to existing dir
2018-11-23 09:07:49 -02:00
Bruno Oliveira
f987b368e8
Merge pull request #3776 from alysivji/attrs-n-dataclasses
...
Detailed assert failure introspection for attrs and dataclasses objects
2018-11-22 21:25:35 -02:00
Ronny Pfannschmidt
88bf01a31e
fix #4386 - restructure construction and partial state of ExceptionInfo
2018-11-22 21:20:32 +01:00
Ronny Pfannschmidt
abaf496fe8
Merge pull request #4440 from nicoddemus/config-warning-stacklevel
...
Adjust stacklevel of "config" warnings
2018-11-22 21:02:52 +01:00
Ronny Pfannschmidt
b71bd9b300
fix #4386 - handle uninitialized exceptioninfo in repr/str
2018-11-22 20:52:15 +01:00
Bruno Oliveira
d471ecc4d8
Add changelog entry
2018-11-22 14:45:50 -02:00
Ronny Pfannschmidt
fc61bdd907
fix 4425: resolve --basetemp to absolute paths
2018-11-20 16:14:50 +01:00
Ronny Pfannschmidt
45c33c4e05
Merge pull request #4379 from hoylemd/improve_minversion_again
...
Use packaging/pkg_resources to check minversion
2018-11-19 21:38:45 +01:00
Anthony Sottile
9a1e518cc3
Add changelog entry for printable node ids
2018-11-19 11:03:52 -08:00
Anthony Sottile
50e3783f07
Merge pull request #4421 from RonnyPfannschmidt/remove-pytest-namespace
...
remove pytest namespace hook
2018-11-19 09:35:33 -08:00
Michael D. Hoyle
1568e38997
Use pkg_resources.parse_version in minver check
...
Use pkg_resources.parse_version in minver check
Add meself to AUTHORS & changelog
Format CHANGELOG
2018-11-19 11:25:27 -05:00
Ronny Pfannschmidt
ba17363d75
remove pytest namespace hook
2018-11-19 14:04:41 +01:00
Daniel Hahler
92a2884b09
pdb: support kwargs with `pdb.set_trace`
...
This handles `header` similar to Python 3.7 does it, and forwards any
other keyword arguments to the Pdb constructor.
This allows for `__import__("pdb").set_trace(skip=["foo.*"])`.
Fixes https://github.com/pytest-dev/pytest/issues/4416 .
2018-11-19 13:04:14 +01:00
Nicholas Devenish
4eddf634e7
Rename and split out the testing, and reword the changelog.
2018-11-18 20:01:11 +00:00
Nicholas Devenish
1a8d9bf254
Let approx() work on more generic sequences
...
approx() was updated in 9f3122fe
to work better with numpy arrays,
however at the same time the requirements were tightened from
requiring an Iterable to requiring a Sequence - the former being
tested only on interface, while the latter requires subclassing or
registration with the abc.
Since the ApproxSequence only used __iter__ and __len__ this commit
reduces the requirement to only what's used, and allows unregistered
Sequence-like containers to be used.
Since numpy arrays qualify for the new criteria, reorder the checks so
that generic sequences are checked for after numpy arrays.
2018-11-18 20:01:11 +00:00
Anthony Sottile
10cdae8e38
Merge pull request #4414 from asottile/starred_with_side_effect
...
Fix assertion rewriting involving Starred + side-effects
2018-11-17 16:17:24 -08:00
Daniel Hahler
5fab0ca312
Merge pull request #4403 from RonnyPfannschmidt/fix-4400
...
Fix #4400 - rearrange the handling of yield test warnings/errors
2018-11-18 00:57:44 +01:00
Anthony Sottile
690a63b921
Fix assertion rewriting involving Starred + side-effects
2018-11-17 10:42:51 -08:00
Daniel Hahler
a252e81ced
Fix collection of testpaths with `--pyargs`
...
Fixes https://github.com/pytest-dev/pytest/issues/4405 .
2018-11-17 13:28:10 +01:00
Ronny Pfannschmidt
950d30e6e0
fix #4400 - rearrange the handling of yield test warnings/errors
2018-11-16 13:49:46 +01:00
Daniel Hahler
0385c27343
cacheprovider: do not write README/.gitignore to existing dir
...
Fixes https://github.com/pytest-dev/pytest/issues/4393 .
2018-11-14 22:09:09 +01:00
Bruno Oliveira
c2d6b3524c
Preparing release version 4.0.0
2018-11-13 21:01:51 +00:00
Bruno Oliveira
e025974cbd
Merge remote-tracking branch 'upstream/master' into release-4.0.0
2018-11-13 20:58:24 +00:00
Bruno Oliveira
557cb6cffe
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-11-13 09:01:37 -02:00
Daniel Hahler
27dab4e05f
Fix CallInfo.__repr__ for unfinished call
...
Fixes https://github.com/pytest-dev/pytest/issues/3554
Ref: https://github.com/pytest-dev/pytest/pull/3560
Ref: https://github.com/pytest-dev/pytest/pull/3562
2018-11-13 08:51:43 +01:00
Bruno Oliveira
dc20dedbc7
Change RemovedInPytest4Warnings to errors by default
...
To keep existing tests which emit RemovedInPytest4Warnings running, decided
to go with a command line option because:
* Is harder to integrate an ini option with tests which already use an ini file
* It also marks tests which need to be removed/updated in 4.1, when
RemovedInPytest4Warning and related functionality are removed.
Fix #3737
2018-11-12 16:10:57 -02:00
Aly Sivji
025d160dfc
Update tests to pass in py27
2018-11-12 09:28:47 -06:00
Aly Sivji
a3e388a73a
Improve changelog
2018-11-12 09:28:47 -06:00
Aly Sivji
1847cc7420
adding docs and cleaning up
2018-11-12 09:28:47 -06:00
Aly Sivji
1184db8273
cleaning up
2018-11-12 09:28:47 -06:00
Aly Sivji
a0ba881c22
Add change to log; name to AUTHORS
2018-11-12 09:28:47 -06:00
Bruno Oliveira
2626bd9afa
Preparing release version 3.10.1
2018-11-11 13:43:04 +00:00
Daniel Hahler
be15ad8d25
Fix collection of direct symlinked files not in python_files
...
Fixes https://github.com/pytest-dev/pytest/issues/4325 .
2018-11-11 01:37:06 +01:00
Daniel Hahler
f551cb9677
Skip Instances with --collect-only
2018-11-10 23:48:02 +01:00
Daniel Hahler
ac8b9c6e9d
Node: do not add "::()" to nodeid
...
Fixes https://github.com/pytest-dev/pytest/issues/4127 .
2018-11-10 23:46:41 +01:00
Daniel Hahler
1b260a844f
Merge branch 'master' into features
2018-11-09 12:49:55 +01:00
Daniel Hahler
a507f44465
cache_dir: use $TOX_ENV_DIR/ prefix if set
...
Fixes https://github.com/pytest-dev/pytest/issues/4270
2018-11-09 05:29:28 +01:00
Bruno Oliveira
423e19909e
Merge pull request #4307 from fzarifian/fzarifian-pr4304
...
#4304 the stepwise plugin must be blocked on cacheprovider plugin block request
2018-11-08 20:42:04 -02:00
Daniel Hahler
91404db284
Fix TypeError in report_collect with _collect_report_last_write
...
`_collect_report_last_write` might be None, when `pytest_collection` was
not called before. Not sure if this indicates another problem, but it
can be reproduced with `testing/test_collection.py::TestCollector::()::test_getcustomfile_roundtrip`.
Fixes https://github.com/pytest-dev/pytest/issues/4329
2018-11-07 23:42:02 +01:00
Bruno Oliveira
9a884f1ccb
Improve changelog a bit
2018-11-07 18:30:13 -02:00
Daniel Hahler
fa35f650b5
Fix handling of duplicate args with regard to Python packages
...
Fixes https://github.com/pytest-dev/pytest/issues/4310 .
2018-11-07 10:06:09 +01:00
Anthony Sottile
176d27440c
Merge pull request #4308 from asottile/compare_versions_with_loose_version
...
Don't string-compare version numbers
2018-11-05 12:42:26 -08:00
Anthony Sottile
85a3333824
Don't string-compare version numbers
2018-11-04 17:31:48 -08:00
Anthony Sottile
4bf6a07fe2
Merge pull request #4305 from RonnyPfannschmidt/cleanup-tobytes
...
replace byte/unicode helpers in test_capture with python level syntax
2018-11-04 17:29:41 -08:00
Fabien ZARIFIAN
db70c75807
Create 4304.bugfix.rst
2018-11-05 00:36:25 +01:00
Ronny Pfannschmidt
7cb271b46f
replace byte/unicode helpers in test_capture with python level syntax
2018-11-04 22:01:01 +01:00
Bruno Oliveira
d1c9c54571
Merge pull request #4297 from nicoddemus/release-3.10.0
...
Release 3.10.0
2018-11-04 12:25:30 -03:00
Bruno Oliveira
c2e906ec97
Preparing release version 3.10.0
2018-11-03 13:51:39 +00:00
Bruno Oliveira
6befdf8b46
Merge remote-tracking branch 'upstream/master' into release-3.10.0
2018-11-03 13:42:20 +00:00
Daniel Hahler
e61e81a7b5
Make debugging's pytest_configure re-entrant
...
This is relevant when using runpytest in-process.
Fixes:
E def test_1(testdir):
E testdir.runpytest()
E > __import__('pdb').set_trace()
E
E ../../test_trace_after_runpytest.py:3:
E …/Vcs/pytest/src/_pytest/debugging.py:81: in set_trace
E tw = _pytest.config.create_terminal_writer(cls._config)
E
E config = None, args = (), kwargs = {}, tw = <py._io.terminalwriter.TerminalWriter object at 0x7f1097088160>
E
E def create_terminal_writer(config, *args, **kwargs):
E """Create a TerminalWriter instance configured according to the options
E in the config object. Every code which requires a TerminalWriter object
E and has access to a config object should use this function.
E """
E tw = py.io.TerminalWriter(*args, **kwargs)
E > if config.option.color == "yes":
E E AttributeError: 'NoneType' object has no attribute 'option'
2018-11-02 18:25:01 +01:00
Bruno Oliveira
21725e9304
Merge pull request #4285 from kchmck/fix-4046
...
Fix problems with running tests in package `__init__` files (#4046 )
2018-11-02 08:26:07 -03:00
Mick Koch
5197354375
Add changelog entry
2018-11-01 13:13:33 -04:00
Bruno Oliveira
f2cebce2eb
Merge pull request #4272 from blueyed/cache-non-default
...
cacheprovider: display cachedir also in non-verbose mode if customized
2018-11-01 12:19:21 -03:00
Daniel Hahler
f8a2452247
changelog [ci skip]
2018-11-01 15:53:31 +01:00
Daniel Hahler
65817dd797
changelog [ci skip]
2018-10-31 23:13:25 +01:00
Bruno Oliveira
d4ca634ef6
Fix linting
2018-10-31 18:21:55 -03:00
William Jamir Silva
9b94313b44
Update changelog
2018-10-31 17:12:50 -03:00
Bruno Oliveira
0fea71a4f5
Merge pull request #4164 from RonnyPfannschmidt/nowarn-session-attributes
...
don`t parse compat properties as fixtures
2018-10-31 12:52:52 -03:00
Bruno Oliveira
b5d62cdb55
Update 2701.bugfix.rst
2018-10-31 11:07:24 -03:00
Ronny Pfannschmidt
da04ff52e4
ignore _CompatProperty when parsing fixtures
...
this avoid triggering the warnings when parsing the session node as session plugin
2018-10-31 15:01:41 +01:00
Daniel Hahler
ff04a1fb09
Merge pull request #4267 from nicoddemus/tmpdir-4262
...
Fix access denied error when deleting a stale temporary directory
2018-10-31 00:25:13 +01:00
Bruno Oliveira
f20eeebde9
Fix access denied error when deleting a stale temporary directory
...
Fix #4262
2018-10-30 15:35:53 -03:00
Anthony Sottile
0d1f142b1c
Swallow warnings during anonymous compilation of source
2018-10-29 08:38:10 -07:00
Palash Chatterjee
c3acf049bd
Fixes #4255 by adding to the documentation that module names are not regex-escaped
2018-10-28 10:45:34 +05:30
Bruno Oliveira
3b7fbcd47f
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-10-27 14:29:01 -03:00
Bruno Oliveira
96784c2052
Preparing release version 3.9.3
2018-10-27 13:07:54 +00:00
Ronny Pfannschmidt
9fe871016d
Merge pull request #4147 from davidszotten/stepwise
...
Stepwise
2018-10-27 15:05:05 +02:00
Ankit Goel
1d09e1d8ce
Merge pull request #4248 from jdufresne/binary-type
...
Remove use of unnecessary compat shim, six.binary_type
2018-10-27 00:03:16 +05:30
Bruno Oliveira
d59786fcc4
Merge pull request #4222 from RonnyPfannschmidt/pathlib-fixes
...
handle race condition when creation and deletion of a numbered dir overlap
2018-10-26 14:36:43 -03:00
Ankit Goel
af34164858
Fix changelog file extension
2018-10-26 22:03:57 +05:30
Jon Dufresne
167e9b954a
Remove use of unnecessary compat shim, six.binary_type
...
The type `bytes` is available on all supported Python versions. On
Python 2.7, it is an alias of str, same as six.binary_type.
Makes the code slightly more forward compatible.
2018-10-26 06:27:50 -07:00
Ronny Pfannschmidt
ae2fc27799
handle test folder cleanup being unable to create a cleanup lock
2018-10-26 14:31:54 +02:00
Ronny Pfannschmidt
ce0b0518c7
fix #4243 - support positional argument stacklevel on python2
2018-10-26 09:01:25 +02:00
Anthony Sottile
777e9e1e17
Merge remote-tracking branch 'origin/master' into merge-master
2018-10-25 18:00:39 -07:00
Anthony Sottile
1af31a09f4
Add a changelog for #4235 [ci skip]
2018-10-25 09:09:25 -07:00
Daniel Hahler
ede3a4e850
pytest_{enter,leave}_pdb: pass through pdb instance
2018-10-25 13:28:24 +02:00
Daniel Hahler
a4ea66cb1f
pdb: resume capturing after `continue`
...
After `pdb.set_trace()` capturing is turned off.
This patch resumes it after using the `continue` (or `c` / `cont`)
command.
Store _pytest_capman on the class, for pdbpp's do_debug hack to keep it.
Without this, `debug …` would fail like this:
/usr/lib/python3.6/cmd.py:217: in onecmd
return func(arg)
.venv/lib/python3.6/site-packages/pdb.py:608: in do_debug
return orig_do_debug(self, arg)
/usr/lib/python3.6/pdb.py:1099: in do_debug
sys.call_tracing(p.run, (arg, globals, locals))
/usr/lib/python3.6/bdb.py:434: in run
exec(cmd, globals, locals)
/usr/lib/python3.6/bdb.py:51: in trace_dispatch
return self.dispatch_line(frame)
/usr/lib/python3.6/bdb.py:69: in dispatch_line
self.user_line(frame)
/usr/lib/python3.6/pdb.py:261: in user_line
self.interaction(frame, None)
.venv/lib/python3.6/site-packages/pdb.py:203: in interaction
self.setup(frame, traceback)
E AttributeError: 'PytestPdb' object has no attribute '_pytest_capman'
- add pytest_leave_pdb hook
- fixes test_pdb_interaction_capturing_twice: would fail on master now,
but works here
2018-10-25 13:28:24 +02:00
Bruno Oliveira
2ad43ee442
Show node that originated a warning in the warnings summary
...
Fix #4221
2018-10-24 18:49:53 -03:00
Bruno Oliveira
b6fa4e248f
Merge pull request #4028 from asottile/revert_breakpoint_code
...
Revert patching of breakpointhook as it appears to do nothing
2018-10-24 17:50:19 -03:00
Daniel Hahler
eee8201e4f
Merge remote-tracking branch 'origin/master' into merge-master
2018-10-24 22:36:34 +02:00
Daniel Hahler
f8f4c16020
TerminalWriter: write "collecting" msg only once every 0.1s
...
Running `pytest -k doesnotmatch` on pytest's own tests takes ~3s with
Kitty terminal for me, but only ~1s with `-q`.
It also is faster with urxvt, but still takes 2.2s there.
This patch only calls `report_collect` every 0.1s, which is good enough
for reporting collection progress, and improves the time with both Kitty
and urxvt to ~1.2s for me.
2018-10-24 16:48:35 +02:00
Bruno Oliveira
8bced7415c
Merge pull request #4220 from anpr/doc_raise_on_empty_parameterset
...
Add `empty_parameter_set_mark` ini option documentation to the parametrize doc
2018-10-23 19:10:44 -03:00
Andreas Profous
0dd85157ea
Add reference to ``empty_parameter_set_mark`` parametrize doc
2018-10-23 22:03:05 +02:00
Daniel Hahler
fadac0ffc0
Fix "Plugin already registered" error with symlinks
...
Fixes https://github.com/pytest-dev/pytest/issues/4174 .
2018-10-23 10:15:23 +02:00
Bruno Oliveira
771e860011
Preparing release version 3.9.2
2018-10-22 21:47:42 +00:00
Ankit Goel
cd72e23f3f
Merge pull request #4207 from nicoddemus/recursive-dep-fixtures
...
Improve error message when a recursive dependency between fixtures is detected
2018-10-20 22:19:21 +05:30
Bruno Oliveira
7bb51b8ceb
Issue a warning when a fixture named 'request' is collected
...
Fix #611
2018-10-20 12:09:44 -03:00
Bruno Oliveira
b9990f77ff
Merge pull request #4204 from vbarbaresi/3340_log_hooks
...
Fix logging usage in hooks pytest_sessionstart/finish
2018-10-20 11:36:06 -03:00
Bruno Oliveira
02ae7d8531
Improve error message when a recursive dependency between fixtures is detected
...
Fix #2909
2018-10-20 09:44:42 -03:00
Bruno Oliveira
f947cb2613
Merge remote-tracking branch 'upstream/features' into davidszotten/stepwise
2018-10-20 09:18:02 -03:00
Vincent Barbaresi
db106d6085
Fix logging usage in hooks pytest_sessionstart/finish #3340
2018-10-20 09:55:10 +02:00
Bruno Oliveira
2abd005cc9
Merge pull request #4195 from nicoddemus/issue-3691
...
Use safe_str() to format warning message about unicode in Python 2
2018-10-19 07:18:29 -03:00
Anthony Sottile
dc0b4efffa
Merge pull request #4196 from nicoddemus/better-signature-error-msg-4026
...
Improve error message when it is not possible to determine a function's signature
2018-10-18 18:56:55 -07:00
Bruno Oliveira
18035211f5
Use safe_str() to format warning message about unicode in Python 2
...
Fix #3691
2018-10-18 21:56:17 -03:00
Anthony Sottile
61080da89d
Merge pull request #4192 from asottile/fix_recwarn_stacklevel
...
Fix filename reported by `warnings.warn` when using `recwarn` under python2.
2018-10-18 16:22:00 -07:00
Bruno Oliveira
ac5704290f
Improve error message when it is not possible to determine a function's signature
...
Fix #4026
2018-10-18 20:06:43 -03:00
Bruno Oliveira
b432f1207c
Merge pull request #4190 from nicoddemus/merge-master-into-features
...
Merge master into features
2018-10-18 19:23:16 -03:00
Anthony Sottile
cdd0e18ca8
Emulate resetting the warnings registry for python 2.x
2018-10-18 10:43:05 -07:00
Sven-Hendrik Haase
f694d8d6ad
Make --color more colorful
2018-10-18 03:56:58 +02:00
Bruno Oliveira
a83ee197c6
Merge remote-tracking branch 'upstream/master' into RonnyPfannschmidt/bump-setuptools
2018-10-17 19:05:52 -03:00
Ronny Pfannschmidt
cc335d44a0
fix #4179 - bring back the current testrun symlink
2018-10-17 20:43:27 +02:00
Ronny Pfannschmidt
4f4c91caf5
fix #4177 - pin setuptools>=40.0
2018-10-17 20:08:07 +02:00
Bruno Oliveira
ee0a306ee4
Merge remote-tracking branch 'upstream/features' into merge-features-into-master
2018-10-16 17:41:27 -03:00
Ronny Pfannschmidt
253c5786af
Preparing release version 3.9.1
2018-10-16 22:16:58 +02:00
Ronny Pfannschmidt
c4550bc922
Merge branch 'release-3.9.0' of github.com:nicoddemus/pytest into release-3.9.1
2018-10-16 22:07:38 +02:00
Ankit Goel
f858177495
Merge pull request #4167 from vbarbaresi/3533_junit_escape_skipped
...
Fix #3533 : properly escape raw XML object
2018-10-16 21:10:42 +05:30
Bruno Oliveira
54b8ad4554
Merge pull request #4159 from thisch/subclassedfile
...
Increase required verbosity level for debug output
2018-10-16 10:41:27 -03:00
Vincent Barbaresi
d72154acda
add changelog for #3533
2018-10-16 15:07:23 +02:00
Bruno Oliveira
2868c31495
Preparing release version 3.9.0
2018-10-15 20:23:30 +00:00
David Szotten
4f652c9045
we have a pr number now
2018-10-15 20:04:39 +01:00
David Szotten
8c059dbc48
draft changelog
2018-10-15 20:04:39 +01:00
Thomas Hisch
e8c220b9bd
Increase required verbosity level for debug output
...
To show the subclassed file in legacy test suits in the runtest output
you have to set the verbosity level to at least "-vv" now.
Closes #3211
2018-10-15 20:38:32 +02:00
Bruno Oliveira
9646a1cd7a
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-10-15 12:55:28 -03:00
Anthony Sottile
093e19a7d9
Merge pull request #4153 from asottile/syntax_warning_filename
...
Display the filename when encountering `SyntaxWarning`.
2018-10-15 08:40:51 -07:00
Bruno Oliveira
58b6e8616c
Merge pull request #4149 from RonnyPfannschmidt/modern-build
...
modernize packaging for setuptools>30.3
2018-10-15 08:13:47 -03:00
Tomer Keren
99d957bd3d
Check off PR requirements
2018-10-15 11:36:31 +03:00
Ankit Goel
141c51f0cb
Merge pull request #4145 from labcodes/4098
...
Add returncode argument to pytest.exit
2018-10-15 11:04:11 +05:30
Ronny Pfannschmidt
d65c7658d5
changelog
2018-10-15 07:32:38 +02:00
Anthony Sottile
2e42d937dc
Display the filename when encountering `SyntaxWarning`.
...
```console
$ cd t && rm -rf __pycache__ && pytest t.py -q -c /dev/null; cd ..
. [100%]
=============================== warnings summary ===============================
<unknown>:2: DeprecationWarning: invalid escape sequence \.
-- Docs: https://docs.pytest.org/en/latest/warnings.html
1 passed, 1 warnings in 0.01 seconds
```
```console
$ cd t && rm -rf __pycache__ && pytest t.py -q -c /dev/null; cd ..
. [100%]
=============================== warnings summary ===============================
/tmp/pytest/t/t.py:2: DeprecationWarning: invalid escape sequence \.
'\.wat'
-- Docs: https://docs.pytest.org/en/latest/warnings.html
1 passed, 1 warnings in 0.01 seconds
```
2018-10-14 16:11:47 -07:00
Jose Carlos Menezes
bbd1cbb0b3
Update changelog to better reading
2018-10-14 18:03:37 -03:00
Ronny Pfannschmidt
1dfa303b1e
fix #4135 - handle symlinks in tmp path cleanup
2018-10-14 21:20:34 +02:00
Jose Carlos Menezes
a0666354dd
Update changelog
2018-10-14 12:29:19 -03:00
Daniel Hahler
3bfaa8ab84
Merge pull request #4132 from blueyed/pdb-internal-dupe
...
Do not print (duplicate) INTERNALERROR with --pdb.
2018-10-14 11:25:35 +02:00
Bruno Oliveira
9fb305b17b
Merge pull request #4086 from jeffreyrack/4063-exclude-0-durations
...
Exclude durations that are 0.00 seconds long.
2018-10-13 22:16:04 -03:00
Daniel Hahler
7268462b33
Resolve symlinks for args
...
This fixes running `pytest tests/test_foo.py::test_bar`, where `tests`
is a symlink to `project/app/tests`: previously
`project/app/conftest.py` would be ignored for fixtures then.
2018-10-13 23:59:05 +02:00
Daniel Hahler
448830e656
Do not print INTERNALERROR with --pdb
...
This gets printed by the terminal reporter already, and currently
results in the same error being displayed twice, e.g. when raising an
`Exception` manually from `pytest.debugging.pytest_exception_interact`.
2018-10-13 23:56:34 +02:00
Jeffrey Rackauckas
47f5c29002
Update messaging for --durations when not in verbose mode.
2018-10-13 12:51:04 -07:00
Bruno Oliveira
24c83d725a
Merge pull request #4129 from nicoddemus/merge-master-into-features
...
Merge master into features (prepare for 3.9)
2018-10-13 12:05:54 -03:00
Bruno Oliveira
29d5849519
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-10-13 08:50:32 -03:00
Bruno Oliveira
8e11fe5304
Improve tracebacks for ImportErrors in conftest.py files
...
Fix #3332
2018-10-12 10:10:55 -03:00
Jose Carlos Menezes
dbaa9464ba
Update usefixtures documentation
...
Clarifying that it can't be used with fixture functions
2018-10-12 09:45:49 -03:00
Bruno Oliveira
933de16fe4
Merge pull request #3988 from RonnyPfannschmidt/tmpdir-port-pathlib
...
Tmpdir port pathlib
2018-10-12 08:33:47 -03:00
Bruno Oliveira
e8348a1d12
Merge pull request #4077 from nicoddemus/short-usage-errors
...
Improve internal error messages
2018-10-12 08:18:07 -03:00
Ronny Pfannschmidt
4736b2bdfb
address review comments
2018-10-11 20:48:30 +02:00
Ronny Pfannschmidt
ad6f63edda
add changelog
2018-10-11 07:15:09 +02:00
Bruno Oliveira
c9a85b0e78
Fix linting
2018-10-10 19:54:39 -03:00
Bruno Oliveira
bf265a424d
Minor adjustments found during code review
2018-10-10 19:35:49 -03:00
Bruno Oliveira
5436e42990
Use pytest.fail(..., pytrace=False) when treating user errors
...
This prevents an enormous and often useless stack trace from showing
to end users.
Fix #3867
Fix #2293
2018-10-10 19:16:53 -03:00
Anthony Sottile
dbfb3ccc42
Add changelog entry
2018-10-10 10:46:09 -07:00
Niklas JQ
d1322570dd
Fix issue 4093
2018-10-10 19:45:07 +02:00
Anthony Sottile
e0f6fce9e9
In python2, display previously warned warnings
2018-10-10 09:37:21 -07:00
Anthony Sottile
aeb92accb2
Implement pytest.deprecated_call with pytest.warns
2018-10-10 08:03:23 -07:00
Bruno Oliveira
9a3836a0cf
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-10-09 19:34:04 -03:00
Jeffrey Rackauckas
fc11b81005
Exclude durations that are 0.00 seconds long.
2018-10-07 19:19:48 -07:00
Ronny Pfannschmidt
66609665f2
Merge pull request #4076 from nicoddemus/unittest-param-fixture-msg
...
Improve error message when TestCase functions use a parametrized fixture
2018-10-06 07:43:57 +02:00
Kyle Altendorf
5ecbb0acba
Correct new changelog to have newline at end
2018-10-05 10:22:07 -04:00
Kyle Altendorf
ee64f1fb9f
Add changelog file for 4073
2018-10-05 10:02:59 -04:00
Bruno Oliveira
a1208f5631
Merge pull request #4075 from nicoddemus/dynamic-fixturenames
...
Fix request.fixturenames to return fixtures created dynamically
2018-10-04 09:21:23 -03:00
Anthony Sottile
b098292352
Merge pull request #4069 from asottile/deindent_4066
...
Fix source reindenting by using `textwrap.dedent` directly.
2018-10-03 16:11:51 -07:00
Bruno Oliveira
212937eb3e
Improve error message when TestCase functions use a parametrized fixture
...
Fix #2535
2018-10-03 19:43:46 -03:00
Bruno Oliveira
70c7273640
Fix request.fixturenames to return fixtures created dynamically
...
Fix #3057
2018-10-03 18:50:14 -03:00
Palash Chatterjee
f9ac60807c
Fixes #4064 by correcting the documentation for unit-tests
2018-10-03 18:11:09 +05:30
Bruno Oliveira
3f03625a5d
Merge pull request #4070 from jeffreyrack/4058-update-fixture-docs
...
Update documentation to indicate a fixture can be invoked more than once in it's scope.
2018-10-03 08:39:41 -03:00
Jeffrey Rackauckas
642847c079
Update documentation on fixture being invoked more than once in a scope.
2018-10-02 20:53:15 -07:00
Anthony Sottile
f102ccc8f0
Fix source reindenting by using `textwrap.dedent` directly.
2018-10-02 16:13:35 -07:00
Anthony Sottile
d3673c7429
Preparing release version 3.8.2
2018-10-02 07:46:02 -07:00
Bruno Oliveira
25fe3706a4
Merge pull request #4056 from nicoddemus/unicode-vars
...
Ensure Monkeypatch setenv and delenv use bytes keys in Python 2
2018-10-02 07:56:32 -03:00
Bruno Oliveira
5e7d427df1
Merge pull request #4060 from nicoddemus/4051-changelog
...
Improve changelog for #4051
2018-10-01 18:12:52 -03:00
Bruno Oliveira
20d0f0e56b
Improve changelog for #4051
2018-10-01 17:12:05 -03:00
Bruno Oliveira
d24a7e6c5a
Issue warning if Monkeypatch.setenv/delenv receive non-strings in Python 2
...
Fixes the bug described in:
https://github.com/tox-dev/tox/pull/1025#discussion_r221273830
Which is more evident when using `unicode_literals`.
2018-10-01 17:05:30 -03:00
Jose Carlos Menezes
4dc73bda45
Update changelog
2018-10-01 14:41:30 -03:00
Ronny Pfannschmidt
5d2d64c190
Merge pull request #4057 from jeffreyrack/4051-improve-error-messaging
...
Improve error messaging when invalid syntax is passed to the -m option
2018-10-01 07:16:59 +02:00
Jeffrey Rackauckas
7a6d16c1eb
Adding .rst to end of changelog fragment filename.
2018-09-30 18:45:49 -07:00
Jeffrey Rackauckas
c2179c3127
Improve error messaging when invalid syntax is passed to the -m option
2018-09-30 18:34:56 -07:00
Bruno Oliveira
d8d7f73e1c
Merge pull request #4045 from nicoddemus/root-conftest-warning-workaround-4039
...
Do not issue non-top-level conftest warning when --pyargs is used
2018-09-27 09:26:11 -03:00
Ronny Pfannschmidt
3c23b5b010
Merge pull request #4037 from nicoddemus/deprecate-item-warnings-captured-hook
...
Document that item parameter of pytest_warning_captured hook is deprecated
2018-09-27 13:20:26 +02:00
Bruno Oliveira
783019a8e6
Rename 4040.trivial.rst to 4040.bugfix.rst
2018-09-27 08:08:03 -03:00
Bruno Oliveira
d2fc7ca6e0
Merge pull request #4041 from Zac-HD/user-properties-type
...
Ensure user_properties is a list
2018-09-27 08:04:30 -03:00
Denis Otkidach
44d29d887e
Changelog entry on excluding empty reports for passed tests
2018-09-26 19:02:35 +03:00