Daniel Hahler
d91527599a
pytester: use monkeypatch with Testdir
2019-04-03 15:02:53 +02:00
Bruno Oliveira
8881b201aa
Preparing release version 4.4.0
2019-03-29 20:49:18 +00:00
Bruno Oliveira
278b289f37
Merge pull request #4968 from blueyed/pdb-do_debug-quit
...
pdb: do not raise outcomes.Exit with quit in debug
2019-03-29 16:22:02 -03:00
Daniel Hahler
e7ade066b6
Merge pull request #5011 from blueyed/merge-master-into-features
...
Merge master into features
2019-03-29 18:35:13 +01:00
Daniel Hahler
4e931b258d
Merge master into features
2019-03-29 11:05:46 +01:00
Daniel Hahler
4011021823
pdb: do not raise outcomes.Exit with quit in debug
2019-03-29 11:02:34 +01:00
Daniel Hahler
bfda2a0050
setup.cfg: use existing [tool:pytest] (ignoring [pytest])
2019-03-29 10:59:27 +01:00
Bruno Oliveira
6b5cddc48a
Merge pull request #4951 from blueyed/fix-pdb-capfix
...
pdb: handle capturing with fixtures only
2019-03-28 20:34:28 -03:00
Gary Tyler
403f556928
Update docs for 'pytest_cmdline_parse' hook to note availability liminations
2019-03-28 19:25:55 -04:00
Bruno Oliveira
d8ef86aadf
Merge pull request #4993 from blueyed/stepwise-report
...
stepwise: report status via pytest_report_collectionfinish
2019-03-28 20:24:18 -03:00
Bruno Oliveira
a9fe1e159a
Merge pull request #4965 from nicoddemus/serialization-hooks
...
Serialization hooks
2019-03-28 20:22:19 -03:00
Bruno Oliveira
65c8e8a09e
Rename hooks: to/from_serializable
2019-03-28 13:41:56 -03:00
Daniel Hahler
46d9243eb0
changelog
2019-03-28 11:56:53 +01:00
Daniel Hahler
c92021fc4f
Merge pull request #5003 from blueyed/off
...
Fix off-by-one error with lineno in mark collection error
2019-03-28 00:09:53 +01:00
Daniel Hahler
76c70cbf4c
Fix off-by-one error with lineno in mark collection error
2019-03-27 17:44:52 +01:00
Jeong YunWon
8b0b7156d9
Fix glitches of original patch of disable-test-id-escaping
2019-03-28 00:07:28 +09:00
ApaDoctor
cf6e2ceafd
add ini option to disable string escape for parametrization
2019-03-28 00:07:28 +09:00
Bruno Oliveira
241b7433cd
Merge pull request #4978 from blueyed/exit-from-from_assertrepr_compare
...
Do not swallow outcomes.Exit in assertrepr_compare
2019-03-26 18:39:13 -03:00
Bruno Oliveira
057c97812b
Merge pull request #4975 from blueyed/verbose-fixes
...
Fix usages of "verbose" option
2019-03-26 18:38:39 -03:00
Bruno Oliveira
02188e399d
Merge pull request #4987 from blueyed/collect-tbstyle-repr_failure
...
CollectError.repr_failure: honor explicit tbstyle option
2019-03-26 18:37:49 -03:00
Daniel Hahler
538efef1ba
logging: close log_file_handler
...
While it should be closed in logging's shutdown [1], the following would
still issue a ResourceWarning:
```
import logging
log_file_handler = logging.FileHandler("temp.log", mode="w", encoding="UTF-8")
root_logger = logging.getLogger()
root_logger.addHandler(log_file_handler)
root_logger.removeHandler(log_file_handler)
root_logger.error("error")
del log_file_handler
```
It looks like the weakref might get lost for some reason.
See https://github.com/pytest-dev/pytest/pull/4981/commits/92ffe42b45 / #4981
for more information.
1: c1419578a1/Lib/logging/__init__.py (L2107-L2139)
2019-03-26 18:24:19 +01:00
Daniel Hahler
94a2e3dddc
stepwise: report status via pytest_report_collectionfinish
2019-03-26 13:20:33 +01:00
Daniel Hahler
e1ae469504
Merge master into features
2019-03-26 10:23:21 +01:00
Daniel Hahler
0d00be4f4f
Do not swallow outcomes.Exit in assertrepr_compare
2019-03-26 10:20:00 +01:00
Daniel Hahler
23146e7527
Fix usages of "verbose" option
...
With `-qq` `bool(config.getoption("verbose"))` is True; it needs to be
checked for `> 0`.
2019-03-26 10:11:25 +01:00
Daniel Hahler
b18df936ea
changelog
2019-03-26 10:06:53 +01:00
Bruno Oliveira
645774295f
Add CHANGELOG
2019-03-25 20:16:59 -03:00
Daniel Hahler
5df45f5b27
Use fixup_namespace_packages also with pytester.syspathinsert
2019-03-22 17:02:26 +01:00
Daniel Hahler
475119988c
monkeypatch.syspath_prepend: call fixup_namespace_packages
...
Without the patch the test fails as follows:
# Prepending should call fixup_namespace_packages.
monkeypatch.syspath_prepend("world")
> import ns_pkg.world
E ModuleNotFoundError: No module named 'ns_pkg.world'
2019-03-22 15:29:08 +01:00
Daniel Hahler
7939e5327c
Merge pull request #4957 from blueyed/config-handle-pno-with-default-plugins
...
config: handle `-p no:plugin` with default plugins
2019-03-20 03:32:03 +01:00
Daniel Hahler
415899d428
config: handle `-p no:plugin` with default plugins
...
`-p no:capture` should not load its fixtures in the first place.
2019-03-20 02:47:13 +01:00
Daniel Hahler
8dda5613ef
Merge pull request #4956 from blueyed/home2
...
pytester: set HOME only with inline_run/popen
2019-03-20 02:29:29 +01:00
Daniel Hahler
714f2113bb
Merge pull request #4929 from blueyed/fix-_factorytraceback-offset
...
Fix line offsets with `ScopeMismatch` errors
2019-03-20 01:30:58 +01:00
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
Bruno Oliveira
23ab43233e
Merge pull request #4920 from nicoddemus/subtests-pytest-1367
...
Internal refactorings required for *external* pytest-subtests plugin
2019-03-19 18:57:11 -03:00
Bruno Oliveira
1a119a22d1
Internal refactorings in order to support the new pytest-subtests plugin
...
Related to #1367
2019-03-19 18:20:41 -03: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
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
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
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
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
Daniel Hahler
d441fa66fe
Fix line offsets with `ScopeMismatch` errors
...
Fixes https://github.com/pytest-dev/pytest/issues/4928 .
2019-03-15 02:47:33 +01:00
Daniel Hahler
7afe17740f
Merge master into features
2019-03-15 00:52:12 +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
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
Bruno Oliveira
74416525d2
Merge pull request #4903 from bmwiedemann/y2038
...
Allow tests to pass after 2038
2019-03-13 20:07:25 -03:00