Commit Graph

8931 Commits

Author SHA1 Message Date
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
Bruno Oliveira 0f5263cdc3
Merge pull request #4109 from njonesu/master
Fix multiple string literals on a line #4093
2018-10-11 15:50:08 -03:00
Ronny Pfannschmidt 4736b2bdfb address review comments 2018-10-11 20:48:30 +02:00
Anthony Sottile 8ecdd4e9ff
Merge pull request #4104 from asottile/deprecated_call_match
Implement pytest.deprecated_call with pytest.warns
2018-10-11 08:20:13 -07:00
Daniel Hahler b3940666a7
Merge pull request #4103 from blueyed/conftest
conftest: optimize _getconftestmodules
2018-10-11 13:52:48 +02:00
Bruno Oliveira e20987ce82
Merge pull request #4110 from blueyed/pdb
tests: fixes for pdbpp
2018-10-11 08:43:24 -03:00
Ronny Pfannschmidt 584051aa90 extend docs with basics about tmp_path and tmp_path_facotry 2018-10-11 10:33:59 +02:00
Ronny Pfannschmidt 16e2737da3 implement tmp_path_factory and deprecate pytest.ensuretemp as intended 2018-10-11 09:41:37 +02:00
Ronny Pfannschmidt 36c2a101cb add missing docstring 2018-10-11 07:15:09 +02:00
Ronny Pfannschmidt ebd597b2fd use the constant for lock timeouts 2018-10-11 07:15:09 +02:00
Ronny Pfannschmidt 94829c391b make tmpdir env cleanup idempotent 2018-10-11 07:15:09 +02:00
Ronny Pfannschmidt b82d6f7a0b pytester: use per test tmproot 2018-10-11 07:15:09 +02:00
Ronny Pfannschmidt 4a436b5470 resolve in code review commments 2018-10-11 07:15:09 +02:00
Ronny Pfannschmidt ad6f63edda add changelog 2018-10-11 07:15:09 +02:00
Ronny Pfannschmidt 3036914097 sort out rmtree expectations 2018-10-11 07:15:09 +02:00
Ronny Pfannschmidt 2831cb9ab5 unify paths.py and pathlib.py 2018-10-11 07:15:09 +02:00
Ronny Pfannschmidt 00716177b4 fix missed Path import 2018-10-11 07:15:09 +02:00
Ronny Pfannschmidt 85cc9b8f12 move all the things into _pytest.pathlib 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt fed4f73a61 ignore rmtree errors 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt d76fa59b35 fix lock timeouts for good this time 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt 2532dc1dbb fix up lock consideration argument 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt 642cd86dd1 shape up removal and lock destruction 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt b3a5b0ebe1 remove path from exposure 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt 8b4a29357e fix typo 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt ab3637d486 implement cleanup for unlocked folders 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt 66a690928c bring in purepath and fix an assertion 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt 8e00280fc1 fix linting 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt d053cdfbbb factor out max and iterate on locks and cleanups 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt 2e39fd89d1 add python27 support by using reduce instead of max 2018-10-11 07:15:08 +02:00
Ronny Pfannschmidt b48e23d54c port interals of tmpdir to a basic pathlib implementation
this is still lacking locking and cleanup of the folders
2018-10-11 07:15:08 +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
Bruno Oliveira 67f40e18a7 Use attr.s(repr=False) because we customize MarkInfo's repr 2018-10-10 19:13:34 -03:00
Daniel Hahler 52ff1eaf37 _getconftestmodules: optimize 2018-10-10 21:30:33 +02:00
Daniel Hahler 602e74c2a7
Merge pull request #4107 from blueyed/__tracebackhide__
pytester: fix __tracebackhide__ for {re_,fn}match_lines
2018-10-10 20:55:32 +02:00
Daniel Hahler be511c1a05 tests: add missing expect before sendeof for pdbpp
With pdb++ this additional `expect` is required, otherwise `sendeof()`
will block forever.
2018-10-10 20:50:49 +02:00
Daniel Hahler f36f9d2698 tests: fix/clarify expect for Pdb
`expect()` expects an regular expression, so "Pdb" is equivalent to
"(Pdb)".

But instead of escaping the parenthesis this patch removes them, to
allow for matching "(Pdb++)", too.
2018-10-10 20:50:49 +02: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
Daniel Hahler 4c9015c3b1
Merge pull request #4105 from blueyed/repr
Fix trailing whitespace in FixtureDef.__repr__
2018-10-10 19:28:32 +02:00
Niklas JQ c14a23d4e4 Fix #4093: multiple string literals on a line 2018-10-10 19:28:31 +02:00
Daniel Hahler b8fc3e569a pytester: fix __tracebackhide__ for {re_,fn}match_lines 2018-10-10 19:27:43 +02:00
Anthony Sottile e0f6fce9e9 In python2, display previously warned warnings 2018-10-10 09:37:21 -07:00
Daniel Hahler d93de6cc67 Fix trailing whitespace in FixtureDef.__repr__ 2018-10-10 18:14:56 +02:00
Anthony Sottile aeb92accb2 Implement pytest.deprecated_call with pytest.warns 2018-10-10 08:03:23 -07:00
Anthony Sottile 943bbdd8ce
Merge pull request #4100 from nicoddemus/merge-master-into-features
Merge master into features
2018-10-10 07:35:09 -07:00
Bruno Oliveira 9a3836a0cf Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-10-09 19:34:04 -03:00