DamianSkrzypczak
6e81c3df92
add changelog for issue #5171 fixes
2019-05-02 21:30:03 +02:00
Allan Lewis
f050203f5d
Improve help for --runxfail flag
...
The help for the '--runxfail' flag is somewhat misleading. The default
behaviour is to run tests marked as 'xfail' but to ignore the results. This
flag alters that behaviour by running these tests as if they weren't marked
'xfail', i.e. their results are not ignored.
2019-05-01 10:04:32 +01:00
Bruno Oliveira
a3c2ec3c5b
Add CHANGELOG for #5182
2019-04-28 11:10:21 -03:00
Nikolay Kondratyev
bc00d0f7db
Fix handle repr error with showlocals and verbose output
2019-04-19 18:54:21 +03:00
Ilya Konstantinov
d67d68f6d3
Eliminate core dependency on 'terminal' plugin
2019-04-17 11:19:19 -07:00
Bruno Oliveira
006dc30476
Preparing release version 4.4.1
2019-04-15 14:24:17 +00:00
Daniel Hahler
8fd5a658eb
monkeypatch.syspath_prepend: invalidate import cache
...
This was done with testdir only, and uses the fixed monkeypatch method
there now.
2019-04-13 16:15:44 +02:00
Anthony Sottile
43e7401c91
Produce a warning when unknown arguments are passed to pytest.param()
2019-04-12 13:00:39 -07:00
Daniel Hahler
757ada2fd2
pdb: try to import --pdbcls in pytest_configure only
...
Fixes https://github.com/pytest-dev/pytest/issues/5039 .
2019-04-03 22:35:18 +02:00
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