Bruno Oliveira
9e522c97fa
Try to fix/improve reporting of test_request_garbage
...
* Run it in a subprocess to reduce possible intereference from the outer pytest
* Print the leaked objects to see if they provide any hints
2018-11-24 08:29:39 -02: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
Anthony Sottile
0d5298475d
Fix `raises(..., "code(string)")` frame filename.
2018-11-23 15:01:35 -08:00
Daniel Hahler
be3b8fc9c1
Fix warnings summary header appearing twice
...
Ref: https://github.com/pytest-dev/pytest/pull/4450#discussion_r236017645
Ref: https://github.com/pytest-dev/pytest/pull/4399
2018-11-23 22:47:58 +01: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
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
c5c728c8bc
Fix test/improve tests a bit in py27
2018-11-22 21:38:33 -02:00
Bruno Oliveira
9ae8429a21
Use a more specific exception type in test_raises_repr_inflight
...
As requested during review
2018-11-22 20:24:46 -02: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
Ronny Pfannschmidt
94d032a6de
Merge pull request #4436 from asottile/print_function
...
Fix formatting of print() calls
2018-11-22 20:17:19 +01:00
Bruno Oliveira
aa765cf8c2
Adjust stacklevel of "config" warnings
...
Related to #4439
2018-11-22 14:44:01 -02:00
Ronny Pfannschmidt
5f1d692072
use Path.resolve in test to sort out osx temporary folder being a symlink
2018-11-22 16:10:12 +01:00
Anthony Sottile
b3700f61ba
Fix formatting of print() calls
2018-11-22 00:15:14 -08:00
Ronny Pfannschmidt
fc61bdd907
fix 4425: resolve --basetemp to absolute paths
2018-11-20 16:14:50 +01: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
e025974cbd
Merge remote-tracking branch 'upstream/master' into release-4.0.0
2018-11-13 20:58:24 +00:00
Bruno Oliveira
fea09cda6c
Merge pull request #4383 from nicoddemus/merge-master-into-features
...
Merge master into features (about to prepare 4.0)
2018-11-13 18:57:41 -02:00
Daniel Hahler
a72eff5a08
Merge pull request #4382 from blueyed/pytester-pop-TOX_ENV_DIR
...
pytester: pop TOX_ENV_DIR from os.environ
2018-11-13 12:42:51 +01: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
a6a96469ca
pytester: pop TOX_ENV_DIR from os.environ
...
Closes: https://github.com/pytest-dev/pytest/pull/4378
Fixes: https://github.com/pytest-dev/pytest/issues/4366
2018-11-13 09:02:52 +01: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
f8f22d29ee
Use a custom cache directory for test_stepwise tests
...
Otherwise the tests will use tox's env cache which makes them flaky
2018-11-12 16:57:39 -02: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
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
87254ca593
Add test for --deselect without "::()"
...
Closes: https://github.com/pytest-dev/pytest/issues/4127 .
2018-11-10 23:46:41 +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
b51c1c3b8d
tests: fix equal_with_bash for .coverage files
...
Fixes https://github.com/pytest-dev/pytest/issues/4162 .
2018-11-10 03:24:02 +01:00
Daniel Hahler
bee72a6622
Fix nodes._check_initialpaths_for_relpath for dirs
...
Ref: https://github.com/pytest-dev/pytest/issues/4321#issuecomment-436951894
Hardens some of the not many tests affected by this:
1. `testing/test_session.py::test_rootdir_option_arg` displayed:
> root/test_rootdir_option_arg2/test_rootdir_option_arg.py
2. `test_cmdline_python_namespace_package` displayed "hello/" prefix for:
> hello/test_hello.py::test_hello
> hello/test_hello.py::test_other
2018-11-09 13:16:59 +01:00
Daniel Hahler
1b260a844f
Merge branch 'master' into features
2018-11-09 12:49:55 +01:00
Bruno Oliveira
e00f3a2fb7
Merge pull request #4353 from blueyed/test_fileimport
...
tests: test_fileimport: improve reporting on failure
2018-11-09 08:32:49 -02: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
Daniel Hahler
4a74d455de
minor: typos
2018-11-09 02:03:44 +01:00
Daniel Hahler
a0890f98d8
tests: harden test_config_error
2018-11-09 01:31:53 +01:00
Daniel Hahler
b494d3d1c1
tests: test_fileimport: improve reporting on failure
2018-11-09 01:17:36 +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
3137c89cf1
Fix/improve handling of chdir with no-args and testpaths
...
Fixes https://github.com/pytest-dev/pytest/issues/4332 .
2018-11-08 17:50:45 +01:00
Daniel Hahler
9d838fa861
Merge branch 'master' into features
...
Conflicts:
src/_pytest/main.py
2018-11-08 02:48:59 +01:00
Bruno Oliveira
17b8e2d45b
Fix linting
2018-11-07 18:32:23 -02:00
Daniel Hahler
f840521854
harden test_collect_init_tests
2018-11-07 19:29:55 +01:00
Daniel Hahler
134b103605
XXX: revert _collect_seen_pkgdirs
2018-11-07 11:01:39 +01: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
Daniel Hahler
cb57159e01
Handle os.chdir() during collection
2018-11-05 23:18:47 +01:00