Commit Graph

9839 Commits

Author SHA1 Message Date
Daniel Hahler a50b92ea67 pytester: set HOME only with inline_run/popen
Ref: https://github.com/pytest-dev/pytest/issues/4955
2019-03-20 01:15:51 +01:00
Daniel Hahler 77c5191ad7
Merge pull request #4953 from blueyed/merge-master-into-features
Merge master into features
2019-03-19 04:13:31 +01:00
Daniel Hahler 751c061d9a Merge master into features 2019-03-19 01:07:10 +01:00
Daniel Hahler a624b84097
Merge pull request #4941 from blueyed/testdir-home
pytester: testdir: set $HOME to tmpdir
2019-03-18 23:02:15 +01:00
Daniel Hahler c75dd10671 pytester: testdir: set $HOME to tmpdir
This avoids loading user configuration, which might interfere with test
results, e.g. a `~/.pdbrc.py` with pdb++.

Also sets USERPROFILE, which will be required with Python 3.8 [1].

1: https://bugs.python.org/issue36264
2019-03-18 20:55:39 +01:00
Bruno Oliveira b696666f5a
Merge pull request #4945 from blueyed/FDCapture-repr-None-targetfd_save
capture: fix FDCapture.__repr__ without targetfd_save
2019-03-18 13:09:30 -03:00
Bruno Oliveira f4f6cb7532
Merge pull request #4946 from blueyed/fix-bench
Fix bench/bench.py without args
2019-03-18 13:04:12 -03:00
Daniel Hahler 98981276a0 capture: fix FDCapture.__repr__ without targetfd_save 2019-03-18 02:33:03 +01:00
Daniel Hahler 8c96b65082 Fix bench/bench.py without args
Fixes:

>   File "…/Vcs/pytest/src/_pytest/config/__init__.py", line 60, in main
>     config = _prepareconfig(args, plugins)
>   File "…/Vcs/pytest/src/_pytest/config/__init__.py", line 179, in _prepareconfig
>     raise TypeError(msg.format(args, type(args)))
> TypeError: `args` parameter expected to be a list or tuple of strings, got: 'empty.py' (type: <class 'str'>)
2019-03-18 02:28:41 +01:00
Bruno Oliveira c926999cfb
Merge pull request #4939 from smheidrich/mark_xfail_language
Minor grammar fixes in pytest.mark.xfail docs
2019-03-17 11:33:20 -03:00
smheidrich 519157cfcf Minor grammar fixes in pytest.mark.xfail docs 2019-03-17 10:14:40 +01:00
Bruno Oliveira 5d14362a75
Merge pull request #4936 from blueyed/use-blocked-plugin
Handle `-p plug` after `-p no:plug`
2019-03-16 12:21:33 -03:00
Daniel Hahler 15fe8c6e90 Handle `-p plug` after `-p no:plug`.
This can be used to override a blocked plugin (e.g. in "addopts") from the
command line etc.
2019-03-16 15:58:00 +01:00
Daniel Hahler c1e01c2992
Merge pull request #4931 from blueyed/linematcher-list
pytester: LineMatcher: assert lines
2019-03-15 23:43:23 +01:00
Daniel Hahler 5e27ea5528 pytester: LineMatcher: assert Sequence when matching in order
This can be helpful when passing a set accidentally.
2019-03-15 23:07:08 +01:00
Bruno Oliveira 33d4c96aa2
Merge pull request #4830 from nicoddemus/warn-on-coroutine
Emit a warning when a coroutine test function is encountered
2019-03-15 09:51:34 -03:00
Bruno Oliveira b3eb5d1eb7
Merge pull request #4932 from hroncok/sphinx2
Pin sphinx-removed-in to >= 0.2.0 to support Sphinx 2.0
2019-03-15 08:18:41 -03:00
Miro Hrončok 2af0a023c9 Pin sphinx-removed-in to >= 0.2.0 to support Sphinx 2.0
Fixes https://github.com/pytest-dev/pytest/issues/4912
2019-03-15 10:56:13 +01:00
Anthony Sottile 5f52d5ee17
Merge pull request #4927 from tkf/skip-doctest
Make pytest.skip work in doctest
2019-03-15 00:14:09 -07:00
Daniel Hahler 95701566f3
Update src/_pytest/outcomes.py
Co-Authored-By: tkf <takafumi.a@gmail.com>
2019-03-15 12:21:48 +09:00
Daniel Hahler 57be1d60dd
Apply suggestions from code review
Co-Authored-By: tkf <takafumi.a@gmail.com>
2019-03-15 11:29:16 +09:00
Takafumi Arakaki 62f96eea6b Include documentation 2019-03-15 11:14:50 +09:00
Takafumi Arakaki fa3cca51e1 Test pytest.skip in doctest 2019-03-15 11:06:57 +09:00
Takafumi Arakaki 43aee15ba3 Make pytest.skip work in doctest 2019-03-15 10:20:46 +09:00
Bruno Oliveira 5c57d92978
Merge pull request #4926 from blueyed/merge-master-into-features
Merge master into features
2019-03-14 21:59:13 -03:00
Daniel Hahler 7afe17740f Merge master into features 2019-03-15 00:52:12 +01:00
Daniel Hahler 158432217c
Merge pull request #4924 from blueyed/fix-pdbpp
Fix/harden some pdb tests
2019-03-15 00:51:12 +01:00
Daniel Hahler 437ff1c01a
Merge pull request #4925 from blueyed/pm-super
pdb: post_mortem: use super()
2019-03-15 00:50:46 +01:00
Bruno Oliveira 40072b9511 Emit a warning when a async def function is not handled by a plugin
Fix #2224
2019-03-14 20:22:23 -03:00
Daniel Hahler 520af9d767 pdb: post_mortem: use super()
This is good practice in general, and I've seen it cause problems (MRO)
with pdb++.
2019-03-14 22:29:57 +01:00
Daniel Hahler bdac9d3dd0 tests: improve test_pdb_interaction_doctest
- ignore pdbrc (might be done in general, but this was the only affected
  test)
- fail faster in case of unexpected failure
2019-03-14 19:16:34 +01:00
Daniel Hahler 37158f5303 tests: fix test_pdb_interaction_continue_recursive with pdbpp 2019-03-14 19:16:34 +01:00
Bruno Oliveira 612c3784e5
Merge pull request #4881 from blueyed/travis-cache
ci: Travis: disable cache by default, only for pre-commit
2019-03-14 12:39:47 -03:00
Daniel Hahler 951e07d71d
Merge pull request #4919 from blueyed/opt
Optimize TracebackEntry.ishidden
2019-03-14 16:37:57 +01:00
Bruno Oliveira 36f774a8fb
Merge pull request #4922 from hroncok/add_object_type
Remove deprecated Sphinx directive add_description_unit()
2019-03-14 12:31:34 -03:00
Bruno Oliveira a2b921f890
Merge pull request #4921 from nicoddemus/mtime-test-for-4903
Add test for mtime issue in #4903
2019-03-14 10:56:08 -03:00
Bruno Oliveira bd70f5c148 Add test for mtime issue in #4903 2019-03-14 10:16:08 -03:00
Miro Hrončok 134b957bf4 Remove deprecated Sphinx directive add_description_unit()
Partial solution for https://github.com/pytest-dev/pytest/issues/4912
2019-03-14 12:16:59 +01:00
Daniel Hahler 4d21dc4f2d Optimize TracebackEntry.ishidden
The expected behavior is that there is no "__tracebackhide__" attribute,
so use `getattr` instead of multiple try/except.
2019-03-14 01:02:46 +01:00
Bruno Oliveira 74416525d2
Merge pull request #4903 from bmwiedemann/y2038
Allow tests to pass after 2038
2019-03-13 20:07:25 -03:00
Bruno Oliveira 44cb51010c Improve CHANGELOG and code comment 2019-03-13 18:52:30 -03:00
Bruno Oliveira 90597226eb
Merge pull request #4829 from nicoddemus/yield-tests-dead-code
Remove dead-code related to yield tests
2019-03-13 14:31:11 -03:00
Bruno Oliveira 7fb5ad82d9
Merge pull request #4916 from blueyed/pin-shinx
docs: pin Sphinx to <2.0
2019-03-12 22:55:24 -03:00
Daniel Hahler f4bcb44025 docs: pin Sphinx to <2.0
Ref: https://github.com/pytest-dev/pytest/issues/4912
2019-03-13 02:36:15 +01:00
Bruno Oliveira b7ae7a654b Remove callspec related block of code
It seems this is no longer required now that we don't support
yield tests anymore. The param attribute was added here:

91b6f2bda8/_pytest/python.py (L888-L891)
2019-03-12 20:10:59 -03:00
Bruno Oliveira 148e6a30c8 Improve coverage 2019-03-12 20:10:59 -03:00
Bruno Oliveira 47bd1688ed Remove dead-code related to yield tests
Just noticed some code that no longer is needed when we removed yield-tests
2019-03-12 20:10:59 -03:00
Daniel Hahler 6630d96253
Merge pull request #4914 from hroncok/issue4913
Fix pytest tests invocation with custom PYTHONPATH
2019-03-12 18:58:54 +01:00
Miro Hrončok d32ab6029f Fix pytest tests invocation with custom PYTHONPATH
Fixes https://github.com/pytest-dev/pytest/issues/4913

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2019-03-12 17:31:42 +01:00
Bruno Oliveira 76c00d1c09
Merge pull request #4909 from nicoddemus/release-4.3.1
Prepare release 4.3.1
2019-03-12 13:23:32 -03:00