Bruno Oliveira
12cc729f6b
Preparing release version 5.2.1
2019-10-06 08:00:49 -04:00
Bruno Oliveira
1c5efffd90
Add changelog entry for #5902
2019-10-06 07:58:23 -04:00
Bruno Oliveira
8c9ea5e055
Fix warnings with attrs 19.2 and fix object assertions ( #5902 )
...
Fix warnings with attrs 19.2 and fix object assertions
2019-10-06 08:47:17 -03:00
Anthony Sottile
c58b0fb4ac
Use ATTRS_EQ_FIELD for attrs 19.2 compat
2019-10-05 18:16:35 -07:00
Anthony Sottile
4011af68cd
Merge pull request #5910 from pytest-dev/asottile-patch-1
...
Fix dynamic scoping changelog link
2019-10-03 09:39:12 -07:00
Anthony Sottile
9637b3e376
Fix dynamic scoping changelog link
2019-10-03 09:01:08 -07:00
Anthony Sottile
33c3ec66b7
Merge pull request #5898 from kevinjfoley/doc-typo-fix
...
Fix doc typo
2019-10-01 12:58:54 -07:00
Hynek Schlawack
a79acf279a
Fix warnings with attrs 19.2 and fix object assertions
...
attrs 19.2 deprecated cmp in favor of the dataclass-ish eq/order duo.
This causes deprecation warnings that in turn break some of the cool new deep
object comparisons. Since we at attrs expected this to be a problem, it shipped
with helpers to write backward and forward compatible code.
This PR uses that and avoids changed to minimal versions.
2019-10-01 20:47:59 +02:00
Bruno Oliveira
9a4c0b991b
Update doc: pytest section in setup.cfg ( #5894 )
...
Update doc: pytest section in setup.cfg
2019-10-01 11:45:01 -03:00
Kevin J. Foley
b490f5f979
Fix doc typo
2019-10-01 10:17:26 -04:00
tadashigaki
acfd0fd9d6
Update doc: pytest section in setup.cfg
2019-10-01 02:44:07 +09:00
Bruno Oliveira
88434f1f42
Release 5.2.0 ( #5885 )
...
Release 5.2.0
2019-09-29 10:26:06 -03:00
Florian Bruhin
4d01740be3
Merge pull request #5887 from asottile/fix_attributes_docs_pytester
...
Fix attribute docs in _pytest.pytester
2019-09-29 14:22:54 +02:00
Anthony Sottile
07792c7113
Fix attribute docs in _pytest.pytester
2019-09-28 18:19:53 -07:00
Bruno Oliveira
068ef90b92
Preparing release version 5.2.0
2019-09-28 21:18:37 -04:00
Bruno Oliveira
065773aa97
Use 'python3' instead of 'python3.6' on tox
...
This allows us to use python3.7+ to use tox
2019-09-28 21:16:20 -04:00
Anthony Sottile
b62276826c
Merge pull request #5886 from nicoddemus/setup-plan-custom-items-5884
...
Fix --setup-only and --setup-show for custom pytest items
2019-09-28 18:08:36 -07:00
Bruno Oliveira
7bdfba3578
Fix --setup-only and --setup-show for custom pytest items
...
Fix #5884
2019-09-28 11:52:09 -03:00
Daniel Hahler
6bfd30d169
Merge pull request #5878 from blueyed/codecov-retry-6
...
ci: codecov: use 6 retries with curl
2019-09-24 10:30:23 +02:00
Daniel Hahler
7731e45615
ci: codecov: use 6 retries with curl
...
This should result in retries of 1+2+4+8+16+32 = 63s.
Ref: https://github.com/pytest-dev/pytest/pull/5869#issuecomment-534235437
2019-09-23 20:58:52 +02:00
Anthony Sottile
8806b1f531
Merge pull request #5875 from asottile/patch-1
...
Make sure to quote `sys.executable` as we're running a shell
2019-09-23 18:55:33 +02:00
Anthony Sottile
19c9e53604
Make sure to quote sys.executable as we're running a shell
2019-09-23 08:58:56 -07:00
Bruno Oliveira
c28b63135f
Merge master into features ( #5874 )
...
Merge master into features
2019-09-23 12:44:20 -03:00
Bruno Oliveira
7c64d5d882
Do not call python directly but use sys.executable. Fixes #5872 ( #5873 )
...
Do not call python directly but use sys.executable. Fixes #5872
2019-09-23 12:28:00 -03:00
Bruno Oliveira
d3d9f9f668
Merge remote-tracking branch 'upstream/master' into mm
2019-09-23 12:09:01 -03:00
Bruno Oliveira
018edf2a0e
Change report-coverage.sh in attempt to fix Azure ( #5869 )
...
Change report-coverage.sh in attempt to fix Azure
2019-09-23 12:01:19 -03:00
Tomáš Chvátal
04c01fb606
test_argcomplete do not call python directly #5872
...
Use sys.executable to detect which python we should actually be testing.
2019-09-23 16:38:15 +02:00
Daniel Hahler
ea0c7e43b6
Remove unneeded codecov options (implied with "-f")
2019-09-23 02:26:53 +02:00
Bruno Oliveira
de8fdab7a9
Change report-coverage.sh in attempt to fix Azure
...
Recently sometimes Azure has failed with:
++ curl -s https://codecov.io/bash
bash: /dev/fd/63: No such file or directory
This attempts to fix this by modifying report-coverage.sh slightly.
2019-09-21 16:02:48 -03:00
Daniel Hahler
c1361b48f8
Merge pull request #5868 from blueyed/mm
...
Merge master into features
2019-09-21 16:29:49 +02:00
Bruno Oliveira
1b4ad7774b
Fix logging doc: change x.level to x.levelno ( #5866 )
...
Fix logging doc: change x.level to x.levelno
2019-09-21 11:28:40 -03:00
Daniel Hahler
409cc2946a
Merge master into features
2019-09-21 16:22:48 +02:00
Bruno Oliveira
3114be9181
Revert "Show banner/full page for the Digital Climate Strike (#… ( #5867 )
...
Revert "Show banner/full page for the Digital Climate Strike (#5861 )"
2019-09-21 11:09:34 -03:00
Bruno Oliveira
e4103cb02c
Release version 5.1.3 ( #5859 )
...
Release version 5.1.3
2019-09-21 10:56:16 -03:00
Bruno Oliveira
217605c217
Revert "Show banner/full page for the Digital Climate Strike ( #5861 )"
...
This reverts commit c8cf748c49 , reversing
changes made to 702acdba46 .
2019-09-21 10:38:10 -03:00
James Cooke
2fcf21a6c7
Fix logging doc: change x.level to x.levelno
2019-09-20 18:38:47 +01:00
Bruno Oliveira
c8cf748c49
Show banner/full page for the Digital Climate Strike ( #5861 )
...
Show banner/full page for the Digital Climate Strike
2019-09-19 10:49:10 -03:00
Bruno Oliveira
249b53e623
Show banner/full page for the Ditigal Climate Strike
...
As discussed in the mailing list, pytest will join the
digital strike for the climate on Sep 20th. This will show
a closable banner on the docs until the date, and when the date
comes the banner will become a (closable) full page.
I will also pin an issue saying that the developers won't be
available on Sep 20th.
2019-09-19 08:26:25 -03:00
Bruno Oliveira
9669413b1f
Merge pull request #5776 from aklajnert/1682-dynamic-scope
...
Implemented the dynamic scope feature.
2019-09-19 08:22:45 -03:00
Andrzej Klajnert
e2382e96ed
Minor cleanup in tests.
2019-09-19 11:13:22 +02:00
Bruno Oliveira
1a9f4a51cb
Preparing release version 5.1.3
2019-09-18 10:11:59 -03:00
Bruno Oliveira
892bdd59dc
Normalize all summary durations, including quiet ones
2019-09-18 10:10:25 -03:00
Bruno Oliveira
df46afc96d
Change fixture argument handling tests to unit-tests
2019-09-18 07:50:35 -03:00
Bruno Oliveira
6918d07560
Merge remote-tracking branch 'upstream/features' into aklajnert/1682-dynamic-scope
2019-09-18 07:44:18 -03:00
Daniel Hahler
c997c32004
Merge pull request #5856 from blueyed/mm
...
Merge master into features
2019-09-17 21:47:40 +02:00
Daniel Hahler
450409d123
Merge master into features
...
Conflicts:
src/_pytest/reports.py
(via 7259c453d , moved the type annotation; setting it to `None`
was removed in 3c82b1cb9 already)
2019-09-17 12:46:36 +02:00
Daniel Hahler
702acdba46
Merge pull request #5811 from blueyed/fulltrace-pytest-raises
...
Handle --fulltrace with pytest.raises
2019-09-14 02:09:36 +02:00
Daniel Hahler
f832ac3316
Handle --fulltrace with pytest.raises
...
This changes `_repr_failure_py` to use `tbfilter=False` always.
2019-09-14 01:41:43 +02:00
Bruno Oliveira
9422e10322
Fix regression due to different cases on Windows ( #5840 )
...
Fix regression due to different cases on Windows
2019-09-13 18:11:12 -03:00
Bruno Oliveira
5c3b4a6f52
Add CHANGELOG entry for #5792
2019-09-12 08:05:50 -03:00
Christian Neumüller
05850d73bd
Re-introduce Christian Neumüller to AUTHORS
...
The introduction was reverted by cd29d56
2019-09-12 08:05:50 -03:00
Bruno Oliveira
b48f51eb03
Use Path() objects to store conftest files
...
Using Path().resolve() is better than py.path.realpath because
it resolves to the correct path/drive in case-insensitive file systems (#5792 ):
>>> from py.path import local
>>> from pathlib import Path
>>>
>>> local('d:\\projects').realpath()
local('d:\\projects')
>>> Path('d:\\projects').resolve()
WindowsPath('D:/projects')
Fix #5819
2019-09-12 08:05:50 -03:00
Bruno Oliveira
cf5b544db3
Revert "Merge pull request #5792 from dynatrace-oss-contrib/bugfix/badcase"
...
This reverts commit 955e542210 , reversing
changes made to 0215bcd84e .
Will attempt a simpler approach
2019-09-12 08:05:43 -03:00
Bruno Oliveira
73c5b7f4b1
Clarify docs by showing tox.ini considered before setup.cfg ( #5839 )
...
Clarify docs by showing tox.ini considered before setup.cfg
2019-09-11 22:14:31 -03:00
Anthony Sottile
8f2f51be6d
Clarify docs by showing tox.ini considered before setup.cfg
2019-09-11 14:07:06 -07:00
Andrzej Klajnert
f2f3ced508
Fixed the fixture function signature.
2019-09-10 16:20:44 +02:00
Bruno Oliveira
23102a7d84
Update doc regarding pytest.raises ( #5834 )
...
Update doc regarding pytest.raises
2019-09-09 16:18:58 -03:00
Gene Wood
f0d538329c
Update doc regarding pytest.raises
...
Remove reference to the `message` argument in the docs as it was deprecated in #4539
2019-09-09 12:14:09 -07:00
Bruno Oliveira
6c8bcf601c
Fix pypy3.6 on windows ( #5828 )
...
Fix pypy3.6 on windows
2019-09-08 12:11:28 -03:00
Anthony Sottile
9d7b919c7d
Fix pypy3.6 on windows
2019-09-07 16:49:05 -07:00
Bruno Oliveira
333e9d5c10
Merge pull request #5824 from blueyed/revert-py350
...
ci: Travis: do not test with 3.5.0
2019-09-06 08:05:51 -03:00
Daniel Hahler
f1b605c95e
ci: Travis: do not test with 3.5.0
...
This causes flaky test failures (crashes).
Closes https://github.com/pytest-dev/pytest/issues/5795 .
2019-09-06 12:29:17 +02:00
Bruno Oliveira
2bb8d93001
Fix for Python 4: replace unsafe PY3 with PY2 ( #5820 )
...
Fix for Python 4: replace unsafe PY3 with PY2
2019-09-05 12:39:06 -03:00
Hugo
d049b35397
Fix for Python 4: replace unsafe PY3 with PY2
2019-09-05 18:06:47 +03:00
Bruno Oliveira
8ee557f7ae
Fix pythonpath anchor ( #5817 )
...
Fix pythonpath anchor
2019-09-04 22:19:57 -03:00
Gene Wood
ca3884d9bb
Add Gene Wood to authors
2019-09-04 09:21:10 -07:00
Gene Wood
bc163605ab
Fix anchor link from Good Practices to Pythonpath doc
2019-09-04 09:18:10 -07:00
Bruno Oliveira
1675048b35
Merge pull request #5808 from goerz/pastebin
...
Fix "lexer" being used when uploading to bpaste.net
2019-08-31 16:11:39 -03:00
aklajnert
10bf6aac76
Implemented the dynamic scope feature.
2019-08-31 18:12:24 +02:00
Michael Goerz
f8dd6349c1
Fix "lexer" being used when uploading to bpaste.net
...
Closes #5806 .
2019-08-30 15:34:03 -04:00
Bruno Oliveira
8c8809e1aa
Merge pull request #5805 from nicoddemus/release-5.1.2
...
Release 5.1.2
2019-08-30 16:05:14 -03:00
Bruno Oliveira
e56544cb58
Preparing release version 5.1.2
2019-08-30 12:43:47 -03:00
Bruno Oliveira
f9cc704b1a
Replace session duration to a fix value in regendoc
2019-08-30 12:42:14 -03:00
Bruno Oliveira
bd57307a39
Merge pull request #5768 from robholt/fixture-class-instance
...
Fix self reference in function scoped fixtures
2019-08-30 12:31:16 -03:00
Bruno Oliveira
667c6463ab
Merge pull request #5803 from nicoddemus/flaky-5795
...
Mark flaky test as xfail on Python 3.5.0
2019-08-30 12:30:11 -03:00
Bruno Oliveira
4e594552eb
Merge pull request #5798 from aklajnert/570-indirect-fixtures
...
Fix the scope behavior with indirect fixtures
2019-08-30 12:29:03 -03:00
Bruno Oliveira
955dc6d18a
Merge remote-tracking branch 'upstream/master' into robholt/fixture-class-instance
2019-08-30 11:21:33 -03:00
Bruno Oliveira
3ddbc7fb2a
Improve CHANGELOG and add some comments
...
Ref: #5768
2019-08-30 11:20:19 -03:00
Bruno Oliveira
bb60736a6f
Run py35 without xdist on Travis
...
Due to the flaky tests in 3.5.0, drop running
py35 with xdist for now in the hope we get better error
messages.
Ref: #5795
2019-08-30 10:59:50 -03:00
Bruno Oliveira
35b3b1097f
Improve CHANGELOG and make test easier to understand for #570
2019-08-30 10:54:58 -03:00
Bruno Oliveira
01082fea12
Serialize/deserialize chained exceptions ( #5787 )
...
Serialize/deserialize chained exceptions
2019-08-30 07:29:48 -03:00
Bruno Oliveira
404cf0c872
Merge pull request #5764 from goerz/pastebin
...
Gracefully handle HTTP errors from pastebin
2019-08-30 07:29:14 -03:00
Bruno Oliveira
a511b98da9
Serialize/deserialize chained exceptions
...
Fix #5786
2019-08-29 20:23:44 -03:00
Andrzej Klajnert
487659d8b1
Fix the scope behavior with indirect fixtures.
2019-08-29 07:23:08 +02:00
Bruno Oliveira
955e542210
Merge pull request #5792 from dynatrace-oss-contrib/bugfix/badcase
...
Fix pytest with mixed up filename casing.
2019-08-28 08:44:16 -03:00
Christian Neumüller
29bb0eda27
Move _uniquepath to pathlib as unique_path.
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2019-08-28 12:29:41 +02:00
Christian Neumüller
a98270eac0
Document the bugfix.
2019-08-27 16:36:40 +02:00
Christian Neumüller
1aac64573f
black formatting.
2019-08-27 16:16:45 +02:00
Michael Goerz
d47b9d04d4
Gracefully handle HTTP errors from pastebin
...
We find that the --pastebin option to pytest sometimes fails with "HTTP
Error 400: Bad Request". We're still investigating the exact cause of
these errors, but in the meantime, a failure to upload to the pastebin
service should probably not crash pytest and cause a test failure in the
continuous-integration.
This patch catches exceptions like HTTPError that may be thrown while
trying to communicate with the pastebin service, and reports them as a
"bad response", without crashing with a backtrace or failing the entire
test suite.
2019-08-26 23:50:46 -04:00
Anthony Sottile
5bf9f9a711
Merge pull request #5788 from nicoddemus/mm
...
Merge master into features
2019-08-26 18:20:07 -07:00
Bruno Oliveira
c28e428249
Merge remote-tracking branch 'upstream/master' into mm
2019-08-26 20:00:30 -03:00
Christian Neumüller
505c3340bf
Fix pytest with mixed up filename casing.
2019-08-26 17:18:46 +02:00
Bruno Oliveira
7a69365486
Move TWMock class to a fixture
...
Using a relative import like before was not very nice
2019-08-26 11:32:57 -03:00
Bruno Oliveira
3c82b1cb97
Refactor report serialization/deserialization code
...
Refactoring this in order to support chained exceptions
more easily.
Related to #5786
2019-08-26 10:54:25 -03:00
Bruno Oliveira
0215bcd84e
update doc ( #5784 )
...
update doc
2019-08-25 13:41:17 -03:00
linchiwei123
01b9774e3b
update doc
2019-08-25 23:50:41 +08:00
Bruno Oliveira
9859d37cf6
Merge pull request #5782 from linchiwei123/patch-1
...
Fix TypeError
2019-08-24 15:40:49 -03:00
Bruno Oliveira
1c7aeb670a
Fix linting
2019-08-24 15:01:48 -03:00
Bruno Oliveira
691c706fcc
Add test for #5782
2019-08-24 14:41:06 -03:00
linchiwei123
a4adf511fc
Fix TypeError
...
can only concatenate str (not "bytes") to str
2019-08-24 23:10:17 +08:00
Anthony Sottile
4265ab3a41
Merge pull request #5773 from asottile/release-5.1.1
...
Preparing release version 5.1.1
2019-08-20 14:45:46 -07:00
Anthony Sottile
b135f5af8d
Preparing release version 5.1.1
2019-08-20 11:30:36 -07:00
Anthony Sottile
daff9066c0
Merge pull request #5752 from bluetech/typing-py350-fix
...
Fix TypeError when importing pytest on Python 3.5.0 and 3.5.1
2019-08-20 08:04:58 -07:00
Ran Benita
c2f762460f
Merge pull request #5673 from bluetech/type-annotations-3
...
1/X Fix check_untyped_defs = True mypy errors
2019-08-20 17:20:40 +03:00
Ran Benita
43eab917a1
Fix coverage
2019-08-20 15:41:32 +03:00
Ronny Pfannschmidt
0e569faca2
Merge pull request #5769 from The-Compiler/remove-training
...
Remove cancelled training
2019-08-20 11:48:36 +02:00
Ran Benita
a7c235732a
Pypy doesn't have sys.getrefcount(), so go back to gc
2019-08-20 11:47:22 +03:00
Ran Benita
cec2183aeb
Add workaround for test_raises_cyclic_reference in Python 3.5.{0,1}
2019-08-20 11:19:25 +03:00
Florian Bruhin
c049fd85ab
Remove cancelled training
2019-08-19 22:07:53 +02:00
Robert Holt
62381125e7
Fix self reference in function scoped fixtures
2019-08-19 15:57:39 -04:00
Anthony Sottile
a7ede64f42
Move @overload to compat
2019-08-18 14:54:52 -07:00
Bruno Oliveira
307652202c
Merge pull request #5762 from pytest-dev/hugovk-patch-1
...
Docs: update tense
2019-08-18 10:20:45 -03:00
Hugo van Kemenade
a287aea00e
Docs: update tense
...
pytest 4.6.0 was released in June 2019
https://pypi.org/project/pytest/#history
2019-08-18 13:34:59 +03:00
Anthony Sottile
6bf6265c59
Merge pull request #5760 from blueyed/F401
...
minor: make noqa comment more specific
2019-08-17 19:54:04 -07:00
Daniel Hahler
7c26a65865
minor: make noqa comment more specific
2019-08-17 23:48:55 +02:00
Daniel Hahler
1e3205e7cf
ci: Travis: use 3.5.0
...
Ref: https://github.com/pytest-dev/pytest/pull/5752#issuecomment-522241225
2019-08-17 23:10:01 +02:00
Daniel Hahler
32dac18f38
Merge pull request #5755 from blueyed/fix-assert-location-with-coverage
...
Fix wrong location of assertion error with Coverage.py .

Reverts using-constant part from 39ba996 .
Fixes https://github.com/pytest-dev/pytest/issues/5754 .
2019-08-17 22:49:00 +02:00
Daniel Hahler
f05ca74d27
Merge pull request #5056 from blueyed/argparsing-width
...
Inject width via pylib to argparse formatter
2019-08-17 21:46:02 +02:00
Daniel Hahler
e5f4c47cd5
test_assertion: minor cleanup
2019-08-17 21:38:52 +02:00
Daniel Hahler
05bfe73cf9
Fix wrong location of assertion error with coverage.py
...
Reverts using-constant part from 39ba99613 .
Fixes https://github.com/pytest-dev/pytest/issues/5754 .
2019-08-17 21:34:13 +02:00
Daniel Hahler
2a6a1ca07d
Inject width via pylib to argparse formatter
...
`argparse.HelpFormatter` looks at `$COLUMNS` only, falling back to a
default of 80.
`py.io.get_terminal_width()` is smarter there, and could even work
better with https://github.com/pytest-dev/py/pull/219 .
This ensures to use a consistent value for formatting the ini values etc.
2019-08-17 16:51:02 +02:00
Ran Benita
9f3bfe82cf
Fix TypeError when importing pytest on Python 3.5.0 and 3.5.1
...
The typing module on these versions have these issues:
- `typing.Pattern` cannot appear in a Union since it is not considered a
class.
- `@overload` is not supported in runtime. (On the other hand, mypy
doesn't support putting it under `if False`, so we need some runtime
hack).
Refs #5751 .
2019-08-17 15:41:59 +03:00
Bruno Oliveira
c3a8e609f9
Merge pull request #5750 from nicoddemus/fix-gh-publish-notes
...
Forward $TRAVIS_REPO_SLUG for GH publish notes
2019-08-16 15:57:01 -03:00
Ran Benita
7259c453d6
Fix some check_untyped_defs = True mypy warnings
2019-08-16 10:41:57 +03:00
Ran Benita
28761c8da1
Have AssertionRewritingHook derive from importlib.abc.MetaPathFinder
...
This is nice for self-documentation, and is the type required by mypy
for adding to sys.meta_path.
2019-08-16 10:41:52 +03:00
Bruno Oliveira
d9c4e646c4
Forward TRAVIS_REPO_SLUG env var for GH publish notes
...
Fix #5749
2019-08-15 22:50:55 -03:00
Bruno Oliveira
8ccc0177c8
Release 5.1.0 ( #5748 )
...
Release 5.1.0
2019-08-15 22:35:59 -03:00
Bruno Oliveira
eaf7ce9a99
Preparing release version 5.1.0
2019-08-15 20:00:09 -04:00
Anthony Sottile
ac3056c5a2
Merge pull request #5747 from blueyed/coveragerc-report
...
.coveragerc: add report section
2019-08-15 16:52:43 -07:00
Bruno Oliveira
409d61b972
Merge remote-tracking branch 'upstream/master' into release-5.1.0
2019-08-15 19:46:46 -04:00
Daniel Hahler
6ead01aacd
testing/python/fixtures.py: use NotImplementedError pattern
2019-08-16 01:14:19 +02:00
Daniel Hahler
4c37dca011
.coveragerc: add report section
...
This will allow for "raise NotImplementedError" to indicate code not to
be covered in tests etc.
2019-08-16 01:14:19 +02:00
Daniel Hahler
44c10dbd5f
Merge pull request #5746 from blueyed/codecov-comment-off
...
ci: add codecov.yml to turn comments off
2019-08-16 01:13:19 +02:00
Bruno Oliveira
0f11a7a73d
Merge master into features ( #5744 )
...
Merge master into features
2019-08-15 19:12:37 -03:00
Daniel Hahler
d50198a3ff
ci: add codecov.yml to turn comments off
...
The only benefit for me is to get notified about finished builds, but
that might happen to early anyway. Apart from that they are rather big
and distract from actual comments.
2019-08-15 23:54:03 +02:00
Bruno Oliveira
ac052a98ad
reword a parametrize example sentence ( #5745 )
...
reword a parametrize example sentence
2019-08-15 14:00:30 -03:00
mei-li
f4a84a8dfd
reword a parametrize example sentence
2019-08-15 18:12:18 +02:00
Bruno Oliveira
1049a38cee
Fix wording as suggested in review of #5741
2019-08-15 10:05:42 -03:00
Bruno Oliveira
d7f082519a
Merge remote-tracking branch 'upstream/master' into mm
...
Conflicts:
src/_pytest/outcomes.py
2019-08-15 10:03:52 -03:00
Bruno Oliveira
2d613a03b3
Async result warn ( #5742 )
...
Async result warn
2019-08-15 09:47:56 -03:00
Bruno Oliveira
28c6c5bb71
check that tests that are partial staticmethods are supported ( #5701 )
...
check that tests that are partial staticmethods are supported
2019-08-15 09:12:01 -03:00
Thomas Grainger
6b9d729ed3
also warn on awaitable or async iterable test results
2019-08-15 12:30:44 +01:00
Bruno Oliveira
0ba774a7c3
warn for async generator functions ( #5734 )
...
warn for async generator functions
2019-08-15 08:17:12 -03:00
Bruno Oliveira
0a62c4ac04
Merge pull request #5729 from Stranger6667/issue-5115
...
Do not treat warnings as errors during ``pytest_configure``.
2019-08-15 08:05:15 -03:00
Thomas Grainger
137255816e
Fix collection of staticmethods defined with functools.partial
...
Related to #5701
2019-08-15 08:04:05 -03:00
Thomas Grainger
2f1b192fe6
Issue a warning for async gen functions
...
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com >
2019-08-15 07:54:10 -03:00
dmitry.dygalo
7183335e62
Capture warnings during `pytest_configure`
...
Fix #5115
2019-08-15 07:50:27 -03:00
Bruno Oliveira
0822a1e53a
Merge pull request #5740 from nicoddemus/use-repo-env-var
...
Use TRAVIS_REPO_SLUG instead of hard-coding pytest-dev/pytest
2019-08-14 21:46:57 -03:00
Bruno Oliveira
cb94fd31c8
Use TRAVIS_REPO_SLUG instead of hard-coding pytest-dev/pytest
...
I was doing final tests on the script today, and forgot to change
the hardecoded "pytest-dev/pytest", which ended up publishing a
`4.99.10` release to the main repository by mistake, as my token
has access to both my fork and main repository.
I deleted the tag immeditely just a few seconds later, so hopefully
this won't cause major problems.
This change makes it safer to test this in the future, never publishing
to the main repository by mistake (as long as the tags are pushed to the
right repositories of course).
2019-08-14 20:29:16 -03:00
Bruno Oliveira
fa75d818cf
pytester: spawn: skip without pexpect.spawn ( #5736 )
...
pytester: spawn: skip without pexpect.spawn
2019-08-14 18:06:06 -03:00
Daniel Hahler
1434b66c35
pytester: spawn: skip without pexpect.spawn
...
"pexpect" can be imported on Windows, but does not have "pexpect.spawn"
then.
Ref: https://github.com/pexpect/pexpect/blob/a803933ed53/pexpect/__init__.py#L73-L76
2019-08-13 17:54:40 +02:00
Bruno Oliveira
a24132ddc5
Publish GitHub release notes after deployment ( #5723 )
...
Publish GitHub release notes after deployment
2019-08-12 13:20:16 -03:00
Daniel Hahler
ed2425119f
Merge pull request #5731 from blueyed/assert-compare-maxsize
...
assertrepr_compare: prefer same maxsize
2019-08-12 16:02:41 +02:00
Bruno Oliveira
a295a3ddaf
test_non_ascii_paste_text: mock call to urlopen ( #5728 )
...
test_non_ascii_paste_text: mock call to urlopen
2019-08-12 10:56:38 -03:00
Bruno Oliveira
3b3ce0e799
remove %s formatting from docs ( #5733 )
...
remove %s formatting from docs
2019-08-12 10:21:31 -03:00
Bruno Oliveira
1a61265b1e
Publish GitHub release notes after deployment
...
Fix #2933
2019-08-12 10:18:43 -03:00
Ran Benita
67ac878ccf
Merge pull request #5732 from blueyed/drop-py2
...
assertion.rewrite: use ast.NameConstant(None) directly
2019-08-12 12:19:40 +03:00
boris
3eb4973065
remove %s formatting from docs
2019-08-12 00:09:53 -06:00
Daniel Hahler
39ba996133
assertion.rewrite: use ast.NameConstant(None) directly
...
`ast.parse("None")` was added/used in 3e6f1fa2d for differences between
Python 2/3, but we do not support py2 anymore.
2019-08-12 07:50:52 +02:00
Daniel Hahler
cb481a354a
assertrepr_compare: prefer same maxsize
...
Previously it would say:
> assert '123456789012...901234567890A' == '1234567890123...901234567890B'"
This makes it look like the "3" might be different already.
This is clearer, and it is OK to have potentially one less char in the
right one:
> assert '123456789012...901234567890A' == '123456789012...901234567890B'"
2019-08-12 03:41:14 +02:00
Bruno Oliveira
300f78556f
Show session duration in human-readable format ( #5721 )
...
Show session duration in human-readable format
2019-08-10 23:05:34 -03:00
Daniel Hahler
0db9dade65
test_non_ascii_paste_text: mock call to urlopen
...
Likely to fix flaky coverage due to requests failing sometimes.
Ref: f7e81dab9a...83a1f4bd66 /changes
2019-08-10 23:30:49 +02:00
Daniel Hahler
a77c83a4c3
Merge pull request #5726 from jdufresne/black
...
Update URL: python/black → psf/black
2019-08-10 22:25:38 +02:00
Jon Dufresne
0767f080a4
Update URL: python/black → psf/black
2019-08-10 12:38:13 -07:00
Bruno Oliveira
2498aeaaa5
Merge master into features ( #5717 )
...
Merge master into features
2019-08-10 11:16:40 -03:00
Bruno Oliveira
345df99db7
Show session duration in human-readable format
...
Fix #5707
2019-08-10 10:45:53 -03:00
Anthony Sottile
8665f5652a
Merge pull request #5722 from nicoddemus/improvements-changelog
...
Add new 'improvement' changelog category
2019-08-10 06:31:39 -07:00
Bruno Oliveira
beb457c75e
Add new 'improvement' changelog category
...
This creates a separate section from 'features' for small changes which
don't usually require user intervention, such as:
* Human readable session duration
* New junitxml fields
* Improved colors in terminal
* etc.
The idea is to better match user expectations about new actual
features in the "Features" section of the changelog.
2019-08-10 09:33:51 -03:00
Bruno Oliveira
f7e81dab9a
5669: pytester: add docstrings for Testdir.copy_example ( #5719 )
...
5669: pytester: add docstrings for Testdir.copy_example
2019-08-10 09:00:42 -03:00
Ilya Stepin
ee936b27a8
pytester: fix docstrings
...
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com >
2019-08-10 09:12:04 +03:00
martbln
e0ce8b79d5
pytester: add docstrings for Testdir.copy_example
2019-08-10 00:59:14 +03:00
Bruno Oliveira
8ffa3aa65d
Improve docs of pytest.importorskip ( #5718 )
...
Improve docs of pytest.importorskip
2019-08-09 18:28:44 -03:00
Tim Hoffmann
b095e0de47
Improve docs of pytest.importorskip
2019-08-09 21:35:03 +02:00
Bruno Oliveira
2f065a555f
Merge remote-tracking branch 'upstream/master' into release-5.1.0
2019-08-09 12:36:19 -03:00
Bruno Oliveira
ec76f70d71
Remove unused function CallSpec2.setall ( #5716 )
...
Remove unused function CallSpec2.setall
2019-08-09 12:35:07 -03:00
Bruno Oliveira
65e6038111
Validate xunit2 files against the schema ( #5605 )
...
Validate xunit2 files against the schema
2019-08-09 12:34:21 -03:00
Daniel Hahler
9f6da8cbeb
Remove unused function CallSpec2.setall
...
Fixes https://github.com/pytest-dev/pytest/issues/5253 .
2019-08-09 16:34:48 +02:00
Bruno Oliveira
ba72b480b9
Remove xfail marker from test_runs_twice_xdist
...
Apperently it does not hang, let's see how it fares on CI
2019-08-09 10:55:06 -03:00
Bruno Oliveira
ba76080b59
Validate xunit2 files against the schema
...
Fix #5095
2019-08-09 10:55:06 -03:00
Bruno Oliveira
5ecac3c861
Add a code of conduct ( #5711 )
...
Add a code of conduct
2019-08-08 12:37:14 -03:00
Florian Bruhin
0a19439677
Add a code of conduct
...
See #5709 and the mails linked from there
2019-08-08 14:01:29 +02:00
Bruno Oliveira
e772bb6480
trivial doc change ( #5708 )
...
trivial doc change
2019-08-08 08:10:36 -03:00
boris
7560a7b808
trivial doc change
2019-08-07 21:49:30 -06:00
Bruno Oliveira
6c8d8a99f4
pyupgrade docs to Python 3 ( #5705 )
...
pyupgrade docs to Python 3
2019-08-07 07:27:34 -03:00
boris
78de9d4677
replace implicit code tag with colon .replace("::\n\n.. code-block", ":\n\n.. code-block")
2019-08-06 16:20:06 -07:00
boris
23a0b532db
Revert "remove implicit code tags .replace("::\n\n.. code-block", "\n\n.. code-block")"
...
This reverts commit 9fce0bdd88 .
2019-08-06 16:18:06 -07:00
boris
9fce0bdd88
remove implicit code tags .replace("::\n\n.. code-block", "\n\n.. code-block")
2019-08-06 15:46:57 -07:00
Bruno Oliveira
28fabc52bd
fix grammar in test_collect_functools_partial docstr ( #5703 )
...
fix grammar in test_collect_functools_partial docstr
2019-08-06 19:24:24 -03:00
boris
5f95dce956
ran blacken-docs
2019-08-06 13:34:58 -07:00
boris
75d0b899bb
ran pyupgrade-docs again
2019-08-06 13:33:21 -07:00
boris
7f90e74e02
label code blocks
2019-08-06 13:25:54 -07:00
boris
cf7761f91f
ran pyupgrade-docs
2019-08-06 12:40:27 -07:00
Thomas Grainger
ef0915e1db
fix grammar in test_collect_functools_partial docstr
2019-08-06 15:27:36 +01:00
Bruno Oliveira
68c486a25f
Add CHANGELOG for 4.6.5 ( #5696 ) ( #5699 )
...
Add CHANGELOG for 4.6.5 (#5696 )
2019-08-05 16:25:24 -03:00
Bruno Oliveira
f5fab2bfa1
Merge master into features ( #5698 )
...
Merge master into features
2019-08-05 15:20:54 -03:00
Bruno Oliveira
f43b54aaeb
Add CHANGELOG for 4.6.5 ( #5696 )
2019-08-05 15:09:31 -03:00
Daniel Hahler
aa06e6c8f3
Merge master into features
2019-08-05 19:12:32 +02:00
Daniel Hahler
bf3aa72a29
Merge pull request #5697 from blueyed/fix-collect-pkg-init
...
Fix RuntimeError when trying to collect package with "__init__.py" only
2019-08-05 18:20:28 +02:00
Daniel Hahler
198fcd8a6f
Fix RuntimeError when trying to collect package with "__init__.py" only
...
Fixes https://github.com/pytest-dev/pytest/issues/4344 .
2019-08-05 17:52:21 +02:00
Bruno Oliveira
f7e925dcc1
Add hostname and timestamp to JUnit XML testsuite tag ( #5692 )
...
Add hostname and timestamp to JUnit XML testsuite tag
2019-08-05 10:19:15 -03:00
Bruno Oliveira
cf6632a57a
Rename 5471.trivial.rst to 5471.feature.rst
2019-08-05 10:19:05 -03:00
Anthony Sottile
1a66a503b6
Merge pull request #5690 from nicoddemus/custom-exit-code-docs
...
Mention pytest-custom_exit_code in the docs
2019-08-04 19:10:36 -07:00
Anthony Sottile
82763a293a
Merge pull request #5684 from nicoddemus/errno-nomore
...
Use OSError subclasses instead of handling errno
2019-08-04 14:50:12 -07:00
Anthony Sottile
73e0bf92f7
Merge pull request #5694 from yashtodi94/public_access_to_exitcode_doc_change
...
Added info to access exitcodes directly
2019-08-04 14:48:23 -07:00
Yash Todi
0d5ed57b40
Added info to access exitcodes directly
2019-08-04 22:35:51 +05:30
Samuel Searles-Bryant
1ce45a6f67
Add hostname and timestamp to JUnit XML testsuite tag
...
Fix #5471
2019-08-03 15:54:39 +01:00
Bruno Oliveira
8db6642515
Mention pytest-custom_exit_code in the docs
...
Related to #5689
2019-08-03 10:15:56 -03:00
Daniel Hahler
29e336bd9b
Merge pull request #5687 from blueyed/merge-master
...
Merge master into features
2019-08-03 14:12:02 +02:00
Bruno Oliveira
d3e1907899
Use OSError subclasses instead of handling errno
2019-08-02 14:17:46 -03:00
Daniel Hahler
b5b710b3ae
Merge master into features
...
Several conflicts, mostly due to 2c402f4bd .
Conflicts:
.pre-commit-config.yaml
src/_pytest/outcomes.py
src/_pytest/python_api.py
tox.ini
2019-08-02 16:52:51 +02:00
Bruno Oliveira
0d3958e8de
Handle only known functions in rm_rf ( #5627 )
...
Handle only known functions in rm_rf
2019-08-02 10:23:12 -03:00
Daniel Hahler
9064eea216
Improve rm_rf to handle only known functions
...
Warnings are emitted if we cannot safely remove
paths.
Fix #5626
2019-08-02 08:18:11 -03:00
Bruno Oliveira
dc6e7b9fcf
Cache splitnode results to improve tests collection time ( #5681 )
...
Cache splitnode results to improve tests collection time
2019-08-01 22:32:19 -03:00
Alexey Zankevich
b43ebb7d65
Cache split nodes results to reduce long tests collection time on large test suites
2019-08-01 20:46:27 -04:00
Anthony Sottile
8a5e72c936
Merge pull request #5682 from nicoddemus/disable-shallow-copy
...
Disable shallow cloning because of setuptools-scm
2019-08-01 09:28:26 -07:00
Bruno Oliveira
cd924b66ca
Disable shallow cloning because of setuptools-scm
...
setuptools-scm needs all tags to guess the version correctly
2019-08-01 12:29:39 -03:00
Anthony Sottile
1076a7e61d
Merge pull request #5680 from ss18/ss18/pr0
...
Fix some typos
2019-08-01 08:18:48 -07:00
Bruno Oliveira
cff58457dd
Fix the confusing different names of fulltrace ( #5668 )
...
Fix the confusing different names of `fulltrace`
2019-08-01 10:30:17 -03:00
Semen Zhydenko
b3f4398d64
surpressing -> suppressing
2019-08-01 15:11:38 +02:00
Semen Zhydenko
2ca47cb3f5
programatically -> programmatically
2019-08-01 15:11:26 +02:00
Semen Zhydenko
d19fe3c410
didnt -> didn't
2019-08-01 15:10:39 +02:00
Semen Zhydenko
2de145f372
wasnt -> wasn't
2019-08-01 15:10:06 +02:00
Semen Zhydenko
942fd91995
shouldnt -> shouldn't
2019-08-01 15:09:14 +02:00
Florian Bruhin
cb15e7c700
Merge pull request #5674 from helloocc/master
...
Doc fix: remove redundant parentheses.
2019-07-30 10:46:29 +02:00
Xixi Zhao
2959fb3198
Doc fix: remove redundant parentheses.
2019-07-30 16:18:22 +08:00
Kaiqi
aa13c625da
Change the warning message
2019-07-27 21:06:29 +02:00
Kaiqi
958374addb
Remove name from author
2019-07-27 17:26:52 +02:00
Kaiqi
6c2f673daf
Have same name for fulltrace
2019-07-27 17:25:23 +02:00
Anthony Sottile
fd2fb36eac
Merge pull request #5665 from hroncok/i5664
...
In test_xfail_handling, only remove __pycache__ if it exists
2019-07-25 18:35:35 -07:00
Miro Hrončok
ab39502c98
In test_xfail_handling, only remove __pycache__ if it exists
...
Previously, the test failed when the directory was not present,
which could have been caused for example by invoking the tests
with PYTHONDONTWRITEBYTECODE=1.
Fixes https://github.com/pytest-dev/pytest/issues/5664
2019-07-26 02:23:14 +02:00
Bruno Oliveira
50c7b5d2b5
fix setenv prepend docs ( #5658 )
...
fix setenv prepend docs
2019-07-24 20:11:05 -03:00
Thomas Grainger
3bdcd6b4f3
Update doc/en/monkeypatch.rst
2019-07-24 20:49:31 +01:00
Bruno Oliveira
d89c88478d
Merge pull request #5657 from helloocc/master
...
Doc fix: delete useless.
2019-07-24 15:22:58 -03:00
Thomas Grainger
635916052c
fix setenv prepend docs
2019-07-24 17:23:48 +01:00
Bruno Oliveira
bd34bd872a
fix docs about syspath_prepend ( #5656 )
...
fix docs about syspath_prepend
2019-07-24 13:19:05 -03:00
helloocc
1d8f668e10
Add author.
2019-07-24 23:44:37 +08:00
helloocc
28343bdcbd
Merge remote-tracking branch 'upstream/master'
2019-07-24 23:35:22 +08:00
Thomas Grainger
ebfe8eabf5
Update doc/en/monkeypatch.rst
2019-07-24 14:27:51 +01:00
Thomas Grainger
829cc5a242
fix docs about syspath_prepend
...
eg it does not modify $PATH
2019-07-24 14:27:05 +01:00
Bruno Oliveira
7fa27485df
Merge pull request #5648 from nicoddemus/improve-exc-info-changelog
...
Make ExceptionInfo.repr change more prominent
2019-07-23 21:24:48 -03:00
Bruno Oliveira
b2839c4084
Merge pull request #5646 from nicoddemus/mark-info-docs
...
Update MarkDecorator docs
2019-07-23 16:42:11 -03:00
Bruno Oliveira
880e368607
Merge pull request #5653 from blueyed/fix-test
...
Followup: unittest: handle outcomes.Exit
2019-07-23 15:09:24 -03:00
Daniel Hahler
b9111fe677
Fix changelog
2019-07-23 19:38:33 +02:00
Daniel Hahler
401c3d1109
tests: unittest: fix/harden "test_exit_outcome"
...
Ref: https://github.com/pytest-dev/pytest/pull/5634#pullrequestreview-265565917
2019-07-23 19:35:51 +02:00
Bruno Oliveira
2a724a1c81
Fix fixture example and regendocs ( #5651 )
...
Fix fixture example and regendocs
2019-07-23 11:53:13 -03:00
Bruno Oliveira
52ad5a1591
Improve output when parsing an ini configuration fails ( #5650 )
...
Improve output when parsing an ini configuration fails
2019-07-23 11:17:42 -03:00
Bruno Oliveira
4abf95ba4f
Merge pull request #5644 from blueyed/rm-_orig_args
...
Replace internal config._origargs with invocation_params.args
2019-07-23 11:03:52 -03:00
Bruno Oliveira
f163b37f6a
Run regen
2019-07-23 10:00:35 -04:00
Bruno Oliveira
a82dd2f064
Fix linting
2019-07-23 10:55:22 -03:00
Bruno Oliveira
1873dc6a8a
Fix fixture example in docs
2019-07-23 09:48:22 -04:00
Florian Bruhin
8c47db724c
Improve output when parsing an ini configuration fails
2019-07-23 15:27:27 +02:00
Bruno Oliveira
693e9d0733
Merge pull request #5634 from blueyed/fix-unittest-exit
...
unittest: handle outcomes.Exit
2019-07-23 10:08:43 -03:00
Bruno Oliveira
5c09cc16f2
Add changelog entry for #5634
2019-07-23 08:55:14 -03:00
Bruno Oliveira
0824789459
Improve test for pytest.exit handling
2019-07-23 08:53:38 -03:00
Bruno Oliveira
ec4ca59bf0
Merge pull request #5631 from RonnyPfannschmidt/fix-5606
...
use identity checks for the mock sentinels
2019-07-23 08:48:58 -03:00
Bruno Oliveira
3c94f32e77
Make ExceptionInfo.repr change more prominent
...
Related to #5579
2019-07-23 08:42:03 -03:00
Bruno Oliveira
d66b6c8371
Update MarkDecorator docs
...
The MarkInfo class no longer exists
2019-07-23 08:07:38 -03:00
Xixi Zhao
6e687c4354
Doc fix: m1 isn't a dependency of f1.
...
According to the file in `example/fixtures/test_fixtures_order.py`, m1 isn't a dependency of f1.
2019-07-23 15:09:32 +08:00
William Woodall
13d8577451
README: fix typo
...
Closes https://github.com/pytest-dev/pytest/pull/5643 .
2019-07-23 06:50:51 +02:00
Daniel Hahler
3c7438969a
Replace internal config._origargs with invocation_params.args
...
Added in https://github.com/pytest-dev/pytest/pull/5564 .
2019-07-23 06:46:56 +02:00
Xixi Zhao
66cfc66d63
Update index.rst
2019-07-22 16:01:56 +08:00
Anthony Sottile
13c4b7d212
Merge pull request #5636 from asottile/fixup_sysmodules_test
...
Fix ordering of sys modules snapshot
2019-07-20 12:30:18 -07:00
Ronny Pfannschmidt
8c7d9124ba
switch num_mock_patch_args to do identity checks for the sentinels
2019-07-20 20:21:27 +02:00
Bruno Oliveira
240d314f36
copy test and changelog from #5607 by @niccodemus
2019-07-20 20:21:27 +02:00
Anthony Sottile
27c9d80a7e
Fix ordering of sys modules snapshot
2019-07-20 11:17:30 -07:00
Bruno Oliveira
cb828ebe70
tox.ini: clean up filterwarnings ( #5633 )
...
tox.ini: clean up filterwarnings
2019-07-20 11:59:23 -03:00
Daniel Hahler
d35d09f82d
unittest: handle outcomes.Exit
...
This is required for pytest to stop when using "quit" in pdb, and should
get honored/handled in general.
2019-07-20 07:11:49 +02:00
Daniel Hahler
f0feb6c83a
fixup! tox.ini: clean up filterwarnings
2019-07-20 01:54:04 +02:00
Daniel Hahler
dcbb9c1f5a
tox.ini: clean up filterwarnings
...
- path.local/path.readlines is not used anymore
- enhance doc for "invalid escape sequence" filter
2019-07-20 01:24:04 +02:00
Anthony Sottile
c05fcc8641
Merge pull request #5615 from bluetech/type-annotations-2
...
Improve mypy setup + a few minor type fixes and removals
2019-07-19 06:48:24 -07:00
Florian Bruhin
c98e7aed94
Merge pull request #5628 from pytest-dev/leipzig-training-info-1
...
Add info about open training in Leipzig
2019-07-19 14:57:47 +02:00
Oliver Bestwalter
c0231ae780
Add info about open training in Leipzig
2019-07-18 21:06:53 +02:00
Ran Benita
675e9507d8
Don't accept bytes message in pytest.{fail,xfail,skip}
...
It seems to have been added in #1439 to fix #1178 .
This was only relevant for Python 2 where it was tempting to use str (==
bytes) literals instead of unicode literals. In Python 3, it is unlikely
that anyone passes bytes to these functions.
2019-07-17 22:39:10 +03:00
Ran Benita
0b532fda76
Remove unnecessary checks from SetupState
...
Since 4622c28ffd , _finalizers cannot
contain Nones or tuples, so these checks are not longer needed.
2019-07-17 22:39:10 +03:00
Ran Benita
7d1c697c30
Remove a no-longer-needed check if enum is available
...
Not needed since 4d49ba6529 .
2019-07-17 22:39:10 +03:00
Ran Benita
65aee1e0c8
Allow bytes for OutcomeException(msg=...)
...
It's __repr__ explicitly handles it so allow it.
2019-07-17 22:39:10 +03:00
Ran Benita
8d413c1926
Allow tuple of exceptions in ExceptionInfo.errisinstance
...
isinstance() accepts it and some code does pass a tuple.
Fixup for commit 55a570e513 .
2019-07-17 22:39:10 +03:00
Ran Benita
104f8fc836
Update mypy from 0.711 to 0.720
...
Release notes: http://mypy-lang.blogspot.com/2019/07/mypy-0720-released.html
2019-07-17 22:39:10 +03:00
Bruno Oliveira
157515f3c5
Fix/Remove broken links ( #5613 )
...
Fix/Remove broken links
2019-07-17 13:52:05 -03:00
Bruno Oliveira
183750fa86
CSS changes to the API reference ( #5609 )
...
CSS changes to the API reference
2019-07-17 06:24:31 -03:00
Ran Benita
fd8f92d0e7
Run mypy on src/ and testing/ together
...
This makes testing/ actually pick up the pytest imports -- otherwise
they are opaque and we don't actually test the types.
A single run is also a bit faster and simpler. The original reason why
we split it is no longer relevant (we fixed the problems).
2019-07-16 23:29:02 +03:00
Steffen Schroeder
1e34734f8f
Fixed link to Python Classifiers
2019-07-16 21:56:04 +02:00
Steffen Schroeder
7c2e843358
Fixed link to correct anchor of Python's -w postion
2019-07-16 21:56:04 +02:00
Steffen Schroeder
79414164c2
Fixed broken links in adopt.rst
2019-07-16 21:56:03 +02:00
Steffen Schroeder
0cca7f831a
Fixed broken links and non-existing anchors in release announcements
2019-07-16 21:56:03 +02:00
Steffen Schroeder
1f4ae789b8
Change link to "Where do Google's flaky tests come from?"
...
Although it's available, linkchecker complained about it.
It was changed to the permanent redirect.
2019-07-16 21:56:03 +02:00
Steffen Schroeder
3f46315a9d
Remove link to non-existing anchor
2019-07-16 21:56:03 +02:00
Steffen Schroeder
e03b8b9e95
Update/Fix links to using projects
2019-07-16 21:56:03 +02:00
Steffen Schroeder
eb7f950e20
Fixed broken link to virtualenv
2019-07-16 21:56:03 +02:00
Steffen Schroeder
848b735a06
Fixed links to non existing GitHub users and py
2019-07-16 21:56:03 +02:00
Steffen Schroeder
7337cce332
Fixed links were content was from 'writing_plugins' to 'reference'
2019-07-16 21:56:02 +02:00
Steffen Schroeder
7a5c0a01bc
Fixed links were content was moved to 'historical'
2019-07-16 21:56:02 +02:00
Ran Benita
faf222f8fb
Merge pull request #5593 from bluetech/type-annotations-1
...
Type-annotate pytest.{exit,skip,fail,xfail,importorskip,warns,raises}
2019-07-16 22:38:20 +03:00
Ran Benita
9258fd1296
Merge pull request #5603 from bluetech/saferepr-simplify
...
Simplify SafeRepr a bit
2019-07-16 22:37:02 +03:00
Thomas Grainger
7440cece59
Merge pull request #5589 from graingert/fixture-yield-exit-stack
...
de-emphasize request.addfinalizer Fixes #5587
2019-07-16 18:33:59 +01:00
Anthony Sottile
f1332872a6
Merge pull request #5611 from mxr/patch-1
...
Remove language_version specification in black hooks
2019-07-16 10:15:28 -07:00
Bruno Oliveira
ac12245f5f
Merge pull request #5612 from The-Compiler/new-trainings-2
...
Remove Europython training
2019-07-16 14:00:04 -03:00
Florian Bruhin
d9eab12ee0
Remove Europython training
2019-07-16 15:03:54 +02:00
Max R
2e756d698b
Remove language_version specification in black hooks
...
Resolves #3840
2019-07-16 08:32:24 -04:00
Bruno Oliveira
15e235c63e
Remove obsolete "importorskip('unittest.mock')" calls ( #5608 )
...
Remove obsolete "importorskip('unittest.mock')" calls
2019-07-16 04:41:58 -03:00
Bruno Oliveira
65c23017c7
Update test_getfuncargnames_patching to work with modern mock
2019-07-15 12:23:59 -03:00
Tim Hoffmann
bb7608c56f
Change section titles in docs
2019-07-15 16:25:33 +02:00
Bruno Oliveira
8a3f40996a
Remove obsolete "importorskip('unittest.mock')" calls
2019-07-15 11:18:05 -03:00
Tim Hoffmann
6f1d358a0c
Fix some ReST indentation issues in docstrings
2019-07-15 16:16:44 +02:00
Tim Hoffmann
3ad315bcee
Improve CSS layout of API reference
2019-07-15 16:15:59 +02:00
Ran Benita
129600d698
saferepr: Avoid indirect function calls
...
The DRY savings they provide are rather small, while they make it harder
to type-check, and IMO harder to understand.
2019-07-15 17:07:58 +03:00
Thomas Grainger
a96710dd8a
demonstrate ExitStack assuming connect returns a context manager
2019-07-15 14:05:19 +01:00
Bruno Oliveira
54e08b729f
More CSS fine-tuning ( #5604 )
...
More CSS fine-tuning
2019-07-15 09:42:18 -03:00
Tim Hoffmann
01606315aa
More CSS fine-tuning
2019-07-15 13:40:30 +02:00
Bruno Oliveira
8f2f3bb1fa
Improve CSS layout ( #5602 )
...
Improve CSS layout
2019-07-14 19:02:58 -03:00
Bruno Oliveira
499fda2349
Various cleanups in src/_pytest/python.py ( #5599 )
...
Various cleanups in src/_pytest/python.py
2019-07-14 19:00:35 -03:00
Ran Benita
c7aacc96bb
saferepr: Remove unused setting of max_other
...
max_other is used by the superclass repr_instance, but we override it
and use maxsize instead.
2019-07-14 22:50:14 +03:00
Ran Benita
0394ebffee
saferepr: Use an __init__ instead of setting attributes after construction
...
This will be easier to type-check, and also somewhat clearer.
2019-07-14 22:50:14 +03:00
Ran Benita
0225be53a2
saferepr: Remove dead SafeRepr.repr_unicode
...
This function is not called anywhere directly, and cannot be called by
the dynamic `repr_<type>()` dispatch mechanism because unicode is no
longer a type in Python 3.
2019-07-14 22:13:57 +03:00
Tim Hoffmann
da5add1294
Improve CSS layout
2019-07-14 18:58:07 +02:00
Ran Benita
11f1f79222
Allow creating ExceptionInfo from existing exc_info for better typing
...
This way the ExceptionInfo generic parameter can be inferred from the
passed-in exc_info. See for example the replaced cast().
2019-07-14 14:28:24 +03:00
Ran Benita
3f1fb62584
Rework ExceptionInfo to not require manual __init__ call
...
Mypy doesn't like calling __init__() in this way.
2019-07-14 14:28:24 +03:00
Ran Benita
14bf4cdf44
Make ExceptionInfo generic in the exception type
...
This way, in
with pytest.raises(ValueError) as cm:
...
cm.value is a ValueError and not a BaseException.
2019-07-14 14:28:24 +03:00
Ran Benita
56dcc9e1f8
Type-annotate pytest.raises
2019-07-14 14:28:24 +03:00
Ran Benita
55a570e513
Type-annotate ExceptionInfo
2019-07-14 14:28:24 +03:00
Ran Benita
2dca68b863
Type-annotate pytest.warns
2019-07-14 14:28:24 +03:00
Ran Benita
d7ee3dac2c
Type-annotate pytest.{exit,skip,fail,xfail,importorskip}
2019-07-14 14:28:24 +03:00
Ran Benita
866904ab80
Revert "Let context-managers for raises and warns handle unknown keyword arguments"
...
This reverts commit dfe54cd82f .
The idea in the commit was to simplify the code by removing the check
and instead letting it TypeError which has the same effect.
However this type error is caught by mypy, and rather than ignoring the
error we think it's better and clearer to go back to the previous
explicit check.
2019-07-14 14:28:21 +03:00
Ran Benita
35a57a0dfb
Use flake8's extend-ignore instead of ignore
...
extend-ignore adds ignores in addition to flake8's existing ignores.
The default ignores currently are:
E121,E123,E126,E226,E24,E704,W503,W504
2019-07-14 11:12:47 +03:00
Florian Bruhin
6afbac29a3
Merge pull request #5600 from wojtekerbetowski/issues/3404
...
Add autouse fixture order information (#3404 ).
2019-07-13 03:22:15 -07:00
Wojtek Erbetowski
d23fbab188
Add autouse fixture order information ( #3404 ).
...
A case with a fixture use both as an autouse and explititly
was raised. This case sounds too narrow to add to documentation
(and could be misleading for people learning pytest with explicitely
using an autouse fixture). At the same time there was no documentation
on the autouse vs regular fixture order, therefore this commit adds
such an information. Code sample grew and it was extracted to the file.
2019-07-13 11:43:47 +02:00
Ronny Pfannschmidt
374c4325a8
refactor finding xunit setup/teardown functions
...
s/_get_non_fixture_func(obj, name: str)/_get_first_non_fixture_func(obj, names: List[str])/
2019-07-13 08:13:46 +02:00
Ronny Pfannschmidt
2c071a060e
refactor resolve_arg_value_types
...
* more explicit type checks
* expand from list+tuple to sequence
2019-07-13 08:13:46 +02:00
Bruno Oliveira
0f8b462677
Include <testsuites> root tag in generated XML ( #5550 )
...
Include <testsuites> root tag in generated XML
2019-07-12 14:35:34 -03:00
Ronny Pfannschmidt
898028cb22
remove unused _get_xunit_setup_teardown
2019-07-12 17:45:23 +02:00
Ronny Pfannschmidt
4480d3e518
generate_tests: always use call_extra
...
- its a noop addition in the methods is empty list
2019-07-12 17:44:17 +02:00
Bruno Oliveira
4868d0d97a
Drop unittest2 support ( #5565 )
...
Drop unittest2 support
2019-07-12 11:13:51 -03:00
Bruno Oliveira
8052c7c5c6
Fix typos in a docstring ( #5598 )
...
Fix typos in a docstring
2019-07-12 07:37:50 -03:00
Ronny Pfannschmidt
13d750db20
simplify the expression which transfers mark names to keywords
2019-07-12 06:16:06 +02:00
Ronny Pfannschmidt
e98627223f
remove the noop init of PyobjMixin
2019-07-12 06:14:36 +02:00
Albert Tugushev
c89e379f49
Fix typos
2019-07-12 02:35:44 +03:00
Bruno Oliveira
24a66db8d3
Remove support code for unittest 2
...
Also moved a pytest_runtest_makereport hook implemented in
nose.py, but nowadays makes more sense to be implemented in
unittest.py
2019-07-11 20:11:06 -03:00
Bruno Oliveira
4027254a4b
Fix rmtree to remove directories with read-only files ( #5588 )
...
Fix rmtree to remove directories with read-only files
2019-07-11 18:57:03 -03:00
Bruno Oliveira
37c37963c4
Fix rmtree to remove directories with read-only files
...
Fix #5524
2019-07-11 18:24:53 -03:00
Bruno Oliveira
666acc9b7a
doctest: Add +NUMBER option to ignore irrelevant floating-point… ( #5576 )
...
doctest: Add +NUMBER option to ignore irrelevant floating-point differences
2019-07-11 07:25:37 -03:00
David Röthlisberger
a740ef2036
docs: Document doctest +NUMBER limitation with strings
...
Also added an "xfail" testcase for the same.
2019-07-11 10:06:57 +01:00
David Röthlisberger
4c590e002f
Fix test_doctest.test_number_non_matches
...
These doctests were expected to fail, but they were failing because of a
silly bug (I forgot to replace "{expression}" with the actual expression
to be tested), not because of the thing they were meant to be testing.
Then I had to fix one of the testcases because it was actually matching:
>>> 3.0 #doctest: +NUMBER
2.99
The doctest is saying that the actual output should match to 2 decimal
places, i.e. within 0.01 -- which it is, so it passes. I changed the
expected output to 2.98 and now it doesn't match (as we expect).
2019-07-11 09:57:44 +01:00
Anthony Sottile
26b06bdb45
Merge pull request #5595 from blueyed/typos
...
doc: fix typos in OPENCOLLECTIVE.rst [ci skip]
2019-07-10 14:01:16 -07:00
Daniel Hahler
d5f1d7aebe
doc: fix typos in OPENCOLLECTIVE.rst [ci skip]
2019-07-10 20:15:22 +02:00
Ran Benita
f7747f5dd6
Remove references to old-style classes in a couple error messages
...
These don't exist in Python 3.
2019-07-10 20:25:45 +03:00
Thomas Grainger
c224c4f1d6
de-emphasize request.addfinalizer
2019-07-10 14:52:40 +01:00
Bruno Oliveira
2c402f4bd9
[cherry-pick to master] Add rudimentary mypy type checking ( #5583 )
...
[cherry-pick to master] Add rudimentary mypy type checking
2019-07-10 07:52:32 -03:00
Bruno Oliveira
602cd5e21f
Introduce Config.invocation_params ( #5564 )
...
Introduce Config.invocation_params
2019-07-10 07:46:34 -03:00
Bruno Oliveira
57e5bd0664
Improve type-checking in OutcomeException ( #5580 )
...
Improve type-checking in OutcomeException
2019-07-09 19:12:05 -03:00
Bruno Oliveira
31738155b5
Remove deprecated features ( #5529 )
...
Remove deprecated features
2019-07-09 19:04:06 -03:00
Bruno Oliveira
9db1823707
Improve type-checking in OutcomeException
...
Fix #5578
2019-07-09 18:26:57 -03:00
Ran Benita
89dfde9535
Add rudimentary mypy type checking
...
Add a very lax mypy configuration, add it to tox -e linting, and
fix/ignore the few errors that come up. The idea is to get it running
before diving in too much.
This enables:
- Progressively adding type annotations and enabling more strict
options, which will improve the codebase (IMO).
- Annotating the public API in-line, and eventually exposing it to
library users who use type checkers (with a py.typed file).
Though, none of this is done yet.
Refs https://github.com/pytest-dev/pytest/issues/3342 .
2019-07-09 12:12:07 -07:00
Anthony Sottile
39a43dbae1
Merge pull request #5575 from bluetech/mypy-initial
...
Add rudimentary mypy type checking
2019-07-09 08:05:14 -07:00
Ran Benita
c1167ac552
Add rudimentary mypy type checking
...
Add a very lax mypy configuration, add it to tox -e linting, and
fix/ignore the few errors that come up. The idea is to get it running
before diving in too much.
This enables:
- Progressively adding type annotations and enabling more strict
options, which will improve the codebase (IMO).
- Annotating the public API in-line, and eventually exposing it to
library users who use type checkers (with a py.typed file).
Though, none of this is done yet.
Refs https://github.com/pytest-dev/pytest/issues/3342 .
2019-07-09 10:49:17 +03:00
Bruno Oliveira
628ff4d619
Improve docs sidebar layout ( #5568 )
...
Improve docs sidebar layout
2019-07-08 19:24:48 -03:00
Bruno Oliveira
add912ff68
Update doc footer/copyright ( #5569 )
...
Update doc footer/copyright
2019-07-08 19:21:38 -03:00
Bruno Oliveira
b77c876481
Merge pull request #5563 from nicoddemus/sort-fix
...
Sort parametrize params to test_external_plugins_integrated
2019-07-08 19:10:45 -03:00
Bruno Oliveira
9b78a216a2
Remove unused import
2019-07-08 19:08:09 -03:00
Bruno Oliveira
7aff51ee83
Show warning about importing abcs from collections once
...
This is being raised by `unittest2.compatibility`:
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
2019-07-08 17:30:15 -03:00
Bruno Oliveira
e33736c791
Merge master into features ( #5559 )
...
Merge master into features
2019-07-08 17:26:49 -03:00
David Röthlisberger
d5cc0f2a62
changelog for new NUMBERS doctest option
2019-07-08 17:16:35 +01:00
David Röthlisberger
2a23fdab9f
docs: Tidy up doctest options section
...
* Move the parts about "how to configure it" (pytest.ini vs. inline
comment) together.
* Move `--doctest-continue-on-failure` into its own sub-heading, as it
isn't related to the doctest optionflags.
2019-07-08 17:07:58 +01:00
David Röthlisberger
aaa7e837cc
doctest: Add +NUMBER option to ignore irrelevant floating-point differences
...
When enabled, floating-point numbers only need to match as far as the
precision you have written in the expected doctest output. This avoids
false positives caused by limited floating-point precision, like this:
Expected:
0.233
Got:
0.23300000000000001
This is inspired by Sébastien Boisgérault's [numtest] but the
implementation is a bit different:
* This implementation edits the literals that are in the "got"
string (the actual output from the expression being tested), and then
proceeds to compare the strings literally. This is similar to pytest's
existing ALLOW_UNICODE and ALLOW_BYTES implementation.
* This implementation only compares floats against floats, not ints
against floats. That is, the following doctest will fail with pytest
whereas it would pass with numtest:
>>> math.py # doctest: +NUMBER
3
This behaviour should be less surprising (less false negatives) when
you enable NUMBER globally in pytest.ini.
Advantages of this implementation compared to numtest:
* Doesn't require `import numtest` at the top level of the file.
* Works with pytest (if you try to use pytest & numtest together, pytest
raises "TypeError: unbound method check_output() must be called with
NumTestOutputChecker instance as first argument (got
LiteralsOutputChecker instance instead)").
* Works with Python 3.
[numtest]: https://github.com/boisgera/numtest
2019-07-08 17:07:58 +01:00
Tim Hoffmann
71c8ca7d3d
Improve sidebar layout
2019-07-07 20:32:09 +02:00
Tim Hoffmann
56a0dd7658
Update doc footer/copyright
2019-07-07 20:23:56 +02:00
Bruno Oliveira
7a82285b03
Update CHANGELOG
2019-07-06 17:29:35 -03:00
Bruno Oliveira
4cda7093f6
Add note about PYTEST_ADDOPTS
2019-07-06 17:27:54 -03:00
Bruno Oliveira
6a9bf2852a
Apply review suggestions: use a simple struct for invocation params
2019-07-06 12:22:19 -03:00
Bruno Oliveira
3e669a262a
Introduce Config.invocation_args and Config.invocation_plugins
...
These attributes can be used to access the unchanged arguments passed
to pytest.main().
The intention is to use these attributes to initialize workers in
the same manner as the master node is initialized in pytest-xdist.
2019-07-05 19:45:23 -03:00
Bruno Oliveira
f1b8431d99
Sort parametrize params to test_external_plugins_integrated
...
This might cause problems during collection with pytest-xdist; we
didn't see any so far mostly by luck I think.
Shame on me for letting that slip in.
2019-07-05 19:05:55 -03:00
Bruno Oliveira
a43ba78d3b
Include <testsuites> root tag in generated XML
...
Fix #5477
2019-07-05 11:29:35 -03:00
Bruno Oliveira
2180d9ef6d
Fix comment in stepwise (follow up to #5555 ) [skip ci] ( #5560 )
...
Fix comment in stepwise (follow up to #5555 ) [skip ci]
2019-07-05 10:26:37 -03:00
Bruno Oliveira
0371a3023a
Fix comment in stepwise (follow up to #5555 ) [skip ci]
2019-07-05 09:57:10 -03:00
Bruno Oliveira
d7588b8d40
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-07-05 08:14:18 -03:00
Bruno Oliveira
b62b549f5f
Preparing release version 5.0.1 ( #5557 )
...
Preparing release version 5.0.1
2019-07-05 08:13:37 -03:00
Bruno Oliveira
60a358fa2d
Replace importlib_metadata with importlib.metadata on Python 3.… ( #5539 )
...
Replace importlib_metadata with importlib.metadata on Python 3.8+
2019-07-04 21:46:43 -03:00
Bruno Oliveira
bb29f31d22
Preparing release version 5.0.1
2019-07-04 20:01:16 -04:00
Bruno Oliveira
b1928f878d
Handle xfail(strict=True) properly in --step-wise mode ( #5555 )
...
Handle xfail(strict=True) properly in --step-wise mode
2019-07-04 20:50:33 -03:00
Bruno Oliveira
8651d880a0
Handle xfail(strict=True) properly in --step-wise mode
...
Fix #5547
2019-07-04 20:28:37 -03:00
Bruno Oliveira
95824c588a
Improve quoting in raises match failure message ( #5553 )
...
Improve quoting in raises match failure message
2019-07-04 10:25:27 -03:00
Miro Hrončok
c54cbd63c8
Replace importlib_metadata with importlib.metadata on Python 3.8+
...
Fixes https://github.com/pytest-dev/pytest/issues/5537
2019-07-04 15:00:10 +02:00
Bruno Oliveira
1db132290f
Apply workaround for multiple short options for Python <= 3.8
...
Hopefully by Python 3.9 this will be fixed upstream, if not we will
need to bump the version again.
Fix #5523
2019-07-04 14:59:40 +02:00
Anthony Sottile
caa08ebd45
Improve quoting in raises match failure message
2019-07-04 05:55:26 -07:00
Bruno Oliveira
b08ae4449b
Add docs about Tidelift and OpenCollective ( #5527 )
...
Add docs about Tidelift and OpenCollective
2019-07-04 07:38:17 -03:00
Anthony Sottile
776a632170
Merge pull request #5540 from bazcrown/yml2yaml
...
Substituted 'yml' to '.yaml' in relevant files
2019-07-03 18:47:26 -04:00
Bruno Oliveira
d74a975f82
remove documentation about setuptools integration Refs #5534 Fi… ( #5546 )
...
remove documentation about setuptools integration Refs #5534 Fixes #3814
2019-07-03 16:01:30 -03:00
Bruno Oliveira
dfe54cd82f
Let context-managers for raises and warns handle unknown keyword arguments
...
As suggested during review
2019-07-03 13:57:28 -03:00
Thomas Grainger
2b9522e9da
remove documentation about setuptools integration Refs #5534
...
integrating with `python setup.py test` is not good practice!
2019-07-03 16:42:53 +01:00
Bruno Oliveira
528ee3e1c5
Add upcoming trainings ( #5544 )
...
Add upcoming trainings
2019-07-03 10:45:14 -03:00
Florian Bruhin
9677099acf
Add upcoming trainings
2019-07-03 14:50:32 +02:00
Michael Moore
1b0e8d73d5
Substituted 'yml' to '.yaml' in relevant files
2019-07-02 23:49:06 -07:00
Bruno Oliveira
50b846e9d3
Merge pull request #5538 from avallbona/patch-2
...
Added talk about pytest in PyBCN June 2019
2019-07-02 19:46:10 -03:00
Andreu Vallbona Plazas
fa9791127a
Added talk about pytest in PyBCN June 2019
...
Added talk about pytest in PyBCN June 2019
2019-07-02 23:18:52 +02:00
Bruno Oliveira
2d9b432613
Add docs about Tidelift and OpenCollective
...
Give an overview of how we as an organization will use the donated money,
as well as show this information more prominently in the docs.
2019-06-30 14:13:30 -03:00
Bruno Oliveira
5d8da88e9e
Merge pull request #5530 from AmirElkess/patch-1
...
update CONTRIBUTING.rst
2019-06-30 14:07:27 -03:00
Bruno Oliveira
0da690c8e9
Update AUTHORS ( #5531 )
...
Update AUTHORS
2019-06-30 14:07:10 -03:00
AmirElkess
e32c903fb6
Update AUTHORS
2019-06-30 18:32:07 +02:00
Bruno Oliveira
0ed7aa2db6
Make 'request' a reserved name for fixtures
2019-06-30 13:31:39 -03:00
Bruno Oliveira
85cc12e328
Move FIXTURE_FUNCTION_CALL constant to the point of error
...
This is no longer a deprecation so it makes sense to move it
to the place where it is needed instead of leaving it in deprecated.py
2019-06-30 13:31:39 -03:00
Bruno Oliveira
c470ade0a5
Remove 'RemovedInPytest4Warning'
2019-06-30 13:31:39 -03:00
AmirElkess
9972c78cfa
update CONTRIBUTING.rst
...
The following edits are for the "Preparing pull requests" section only.
1. remove Python2-related commands.
2. clarifying some details for beginners. Such as that pre-commit must to be installed as admin to function properly.
3. Added "You may not create a changelog entry if the change doesn't affect the documented behaviour of Pytest." on line 270.
2019-06-30 18:29:37 +02:00
Bruno Oliveira
3a17c1b30b
Remove 'pytest_logwarning' hook
2019-06-30 13:18:07 -03:00
Bruno Oliveira
7b35405033
Remove YIELD_TESTS from deprecated module as it is now an error
2019-06-30 13:18:07 -03:00
Bruno Oliveira
aa1955de72
Remove 'tmpdir_factory.ensuretemp'
2019-06-30 13:18:07 -03:00
Bruno Oliveira
7e58defc15
Remove 'pytest.config'
2019-06-30 13:18:07 -03:00
Bruno Oliveira
f2b7809d5d
Move setup.cfg error message and tests to an appropriate location
...
Those are not really deprecated anymore and are part of the normal
code for config
2019-06-30 13:18:07 -03:00
Bruno Oliveira
647d89c444
Move code about 'pytest_plugins' error to a more appropriate place
...
It is no longer deprecated, but part of the normal code for 'config'
2019-06-30 13:18:07 -03:00
Bruno Oliveira
683b2632b4
Remove explicit kwargs handling from raises, warns and ParameterSet.param
2019-06-30 13:18:06 -03:00
Bruno Oliveira
13f7f27fd2
Remove 'message' parameter from pytest.raises
2019-06-30 13:18:06 -03:00
Bruno Oliveira
279733a30b
Remove support for 'code as string' from pytest.raises and pytest.warns
2019-06-30 11:40:24 -03:00
Bruno Oliveira
be91c4d932
Remove Request.getfuncargvalue
2019-06-30 11:02:46 -03:00
Bruno Oliveira
497cd87fdd
Apply workaround for multiple short options for Python <= 3.8 ( #5526 )
...
Apply workaround for multiple short options for Python <= 3.8
2019-06-29 12:33:00 -03:00
Bruno Oliveira
94a05e513e
Run py38-xdist as part of the build instead of cron
2019-06-29 11:19:50 -03:00
Bruno Oliveira
9021194efd
Apply workaround for multiple short options for Python <= 3.8
...
Hopefully by Python 3.9 this will be fixed upstream, if not we will
need to bump the version again.
Fix #5523
2019-06-29 11:15:28 -03:00
Bruno Oliveira
d4a76a0b99
doc(plugin_hooks): Improve documentation for writing plugin hoo… ( #5517 )
...
doc(plugin_hooks): Improve documentation for writing plugin hooks.
2019-06-29 09:39:49 -03:00
Bruno Oliveira
789a3662ce
Fix linting
2019-06-29 09:11:09 -03:00
Niklas Meinzer
93a68cdfb4
doc(plugin_hooks): Improve documentation for writing plugin hooks.
2019-06-29 14:02:53 +02:00
Anthony Sottile
4f9bf028f5
Merge pull request #5522 from nicoddemus/merge-master-into-features
...
Merge master into features
2019-06-28 20:22:56 -07:00
Anthony Sottile
4bc0415720
Merge pull request #5521 from asottile/cherry-pick-maintenance-release
...
4.6.4 changelog notes
2019-06-28 19:28:44 -07:00
Anthony Sottile
844d660d5c
Merge pull request #5520 from asottile/release-4.6.4
...
Preparing release version 4.6.4
2019-06-28 19:09:10 -07:00
Anthony Sottile
2c6453c72d
Merge pull request #5509 from asottile/release-5.0.0
...
Preparing release version 5.0.0
2019-06-28 18:12:16 -07:00
Bruno Oliveira
e6ffa78e59
Refactoring doctests ( #5518 )
...
Refactoring doctests
2019-06-28 19:15:02 -03:00
Anthony Sottile
58bfc7736f
Use shutil.which to avoid distutils+imp warning
2019-06-28 14:44:49 -07:00
Anthony Sottile
97f0a20ca9
Add notice about py35+ and move ExitCode changelog entry
2019-06-28 14:40:10 -07:00
Anthony Sottile
55d2fe076f
Use importlib instead of imp in demo
2019-06-28 14:40:10 -07:00
Anthony Sottile
5e39eb91bb
Correct Zac-HD's name in changelogs
2019-06-28 14:40:10 -07:00
Anthony Sottile
fd2f320485
Preparing release version 5.0.0
2019-06-28 14:39:53 -07:00
Bruno Oliveira
73d918db55
Remove astor and reproduce the original assertion expression ( #5512 )
...
Remove astor and reproduce the original assertion expression
2019-06-28 18:36:11 -03:00
Anthony Sottile
7ee244476a
Remove astor and reproduce the original assertion expression
2019-06-28 13:38:52 -07:00
AmirElkess
bf39e89946
Refactoring doctests
2019-06-28 21:16:17 +02:00
Bruno Oliveira
3c9b46f781
Remove stray comment from tox.ini ( #5507 )
...
Remove stray comment from tox.ini
2019-06-27 15:12:57 -03:00
Anthony Sottile
f7bfbb557e
Merge pull request #5506 from asottile/fix_no_terminal
...
Fix crash when discovery fails while using `-p no:terminal`
2019-06-27 10:46:43 -07:00
Anthony Sottile
45af361a67
Remove stray comment from tox.ini
2019-06-27 10:46:08 -07:00
Anthony Sottile
4e723d6750
Fix crash when discovery fails while using -p no:terminal
2019-06-27 10:24:29 -07:00
Bruno Oliveira
65fbdf2568
Don't crash with --pyargs and a filename that looks like a modu… ( #5503 )
...
Don't crash with --pyargs and a filename that looks like a module
2019-06-27 13:53:02 -03:00
Bruno Oliveira
5ef507982c
Add Open Collective to FUNDING.yml ( #5504 )
...
Add Open Collective to FUNDING.yml
2019-06-27 13:49:58 -03:00
Florian Bruhin
2479a91e92
Add Open Collective to FUNDING.yml
2019-06-27 17:53:03 +02:00
Anthony Sottile
3e0e31a364
Don't crash with --pyargs and a filename that looks like a module
2019-06-27 08:32:32 -07:00
Anthony Sottile
c9923a3a5c
Merge pull request #5499 from nicoddemus/cleanup-py35-rewrite
...
Remove py<35 compatibility code from rewrite.py
2019-06-26 21:31:54 -07:00
Bruno Oliveira
1be49e713a
Remove py<35 compatibility code from rewrite.py
2019-06-26 21:44:10 -03:00
Bruno Oliveira
37fb50a3ed
Features assertion pass hook ( #3479 )
...
Features assertion pass hook
2019-06-26 21:14:19 -03:00
Bruno Oliveira
790806e865
Merge pull request #5494 from Zac-HD/funcargnames-to-fixturenames
...
Deprecate funcargnames alias for fixturenames
2019-06-26 21:13:59 -03:00
Bruno Oliveira
2ea22218ff
Cover assertions with messages when enable_assertion_pass_hook is enabled
2019-06-26 20:46:31 -03:00
Bruno Oliveira
629eb3ec6a
Move formatting variables under the "has impls" if
...
Small optimization, move the generation of the intermediate
formatting variables inside the 'if _check_if_assertion_pass_impl():'
block.
2019-06-26 19:26:12 -03:00
Bruno Oliveira
8edf68f3c0
Add a trivial note about astor
2019-06-26 19:21:12 -03:00
Bruno Oliveira
3afee36ebb
Improve docs and reference
2019-06-26 19:15:00 -03:00
Bruno Oliveira
fcbe66feba
Restore proper handling of '%' in assertion messages
2019-06-26 18:51:27 -03:00
Bruno Oliveira
eb90f3d1c8
Fix default value of 'enable_assertion_pass_hook'
2019-06-26 17:54:24 -03:00
Victor Maryama
6854ff2acc
Fixed import order pep8.
2019-06-26 19:05:17 +02:00
Victor Maryama
53234bf613
Added config back to AssertionWriter and fixed typo in check_if_assertion_pass_impl function call.
2019-06-26 19:00:31 +02:00
Victor Maryama
6f851e6cbb
Merge remote-tracking branch 'upstream/master' into features-assertion-pass-hook-master
...
# Conflicts:
# src/_pytest/assertion/rewrite.py
2019-06-26 18:12:56 +02:00
Victor Maryama
9a34d88c8d
Explanation variables only defined if failed or passed with plugins implementing the hook.
2019-06-26 18:10:16 +02:00
Victor Maryama
d91a5d3cd7
Further reverting changes.
2019-06-26 18:10:16 +02:00
Victor Maryama
f755ff6af1
Black formatting.
2019-06-26 18:10:16 +02:00
Victor Maryama
d638da5821
Using ini-file option instead of cmd option.
2019-06-26 18:10:16 +02:00
Victor Maryama
0fb52416b1
Reverted changes.
2019-06-26 18:10:15 +02:00
Bruno Oliveira
6a2d844c5d
Fix typo replace circuting with circuiting. ( #5497 )
...
Fix typo replace `circuting` with `circuiting`.
2019-06-26 11:09:22 -03:00
Bruno Oliveira
a48feb3261
Delete 5497.trivial.rst
...
Just a typo, no need for a changelog entry. :)
2019-06-26 11:09:04 -03:00
Anthony Sottile
6cf8e71dca
Merge pull request #5496 from pytest-dev/stray_comment
...
Delete stray comment
2019-06-26 05:59:38 -07:00
Tim Gates
994c32235c
Fix rst support
2019-06-26 20:46:09 +10:00
Tim Gates
d81f758285
Update changelog with trivial as per ./CONTRIBUTING.rst
2019-06-26 20:31:45 +10:00
Tim Gates
fdb6e35b1b
Fix typo replace circuting with circuiting.
2019-06-26 20:23:35 +10:00
Victor Maryama
7efdd5063b
Update src/_pytest/assertion/rewrite.py
...
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com >
2019-06-26 10:50:27 +02:00
Anthony Sottile
bfba33ec9e
Delete stray comment
2019-06-25 20:24:13 -07:00
Anthony Sottile
3f3f3e7a29
Merge pull request #5495 from nicoddemus/blueyed/cmp-bytes
...
Improve comparison of byte strings (supersedes #5267 )
2019-06-25 19:16:24 -07:00
Bruno Oliveira
aaf40314d1
Do not attempt to rewrite non-source files ( #5490 )
...
Do not attempt to rewrite non-source files
2019-06-25 20:43:23 -03:00
Bruno Oliveira
3f2344e8f7
Show bytes ascii representation instead of numeric value
2019-06-25 20:40:25 -03:00
Daniel Hahler
8c7eb82363
Fix/improve comparison of byte strings
...
Fixes https://github.com/pytest-dev/pytest/issues/5260 .
2019-06-25 20:15:45 -03:00
Bruno Oliveira
1aefb24b37
Merge features into master ( #5491 )
...
Merge features into master
2019-06-25 20:02:02 -03:00
Zac Hatfield-Dodds
ed85c83154
Deprecate funcargnames alias
2019-06-26 08:53:17 +10:00
Anthony Sottile
bd647fdd8b
Revert allow_abbrev=False in helper scripts
2019-06-25 14:50:07 -07:00
Victor Maryama
80ac910a24
Added msg to docstring for cleaning pyc.
2019-06-25 19:49:57 +02:00
Victor Maryama
4db5488ed8
Now dependent on command line option.
2019-06-25 19:49:05 +02:00
Victor Maryama
cfbfa53f2b
Using pytester subprocess to avoid keeping references in the HookRecorder.
2019-06-25 17:46:56 +02:00
Victor Maryama
db50a975fd
Reverted leak fixture test.
2019-06-25 17:23:14 +02:00
Bruno Oliveira
019455298b
Merge remote-tracking branch 'upstream/features' into merge-features-into-master
2019-06-25 12:07:54 -03:00
Bruno Oliveira
64a6365227
Include pytest version in the cached pyc tags ( #5484 )
...
Include pytest version in the cached pyc tags
2019-06-25 12:07:01 -03:00
Anthony Sottile
b991810f32
Do not attempt to rewrite non-source files
2019-06-25 08:00:20 -07:00
Zac Hatfield-Dodds
4d5780facf
Merge pull request #5469 from Zac-HD/disallow-abbrev
...
Disallow abbreviated command-line options
2019-06-25 22:38:52 +10:00
Victor Maryama
81e3f3cf95
Black formatting
2019-06-25 10:41:11 +02:00
Victor Maryama
2280f28596
Black formatting.
2019-06-25 10:36:01 +02:00
Victor Maryama
f8c9a7b86d
Formatting and removed py2 support.
2019-06-25 10:35:42 +02:00
Victor Maryama
98b212cbfb
Added "experimental" note.
2019-06-25 10:35:09 +02:00
Zac Hatfield-Dodds
d72fb73fa0
Do not allow abbreviated arguments
2019-06-25 13:51:33 +10:00
Bruno Oliveira
a54e2e19f5
Clarify changelog entries should be rst files ( #5485 )
...
Clarify changelog entries should be rst files
2019-06-24 22:33:40 -03:00
Bruno Oliveira
37fce6c6e5
Pickup addition positional args passed to _parse_parametrize_ar… ( #5483 )
...
Pickup addition positional args passed to _parse_parametrize_args
2019-06-24 22:05:19 -03:00
Kevin J. Foley
23aa3bb0ae
Clarify changelog entries should be rst files
2019-06-24 20:55:51 -04:00
Kevin J. Foley
95714436a1
Pickup additional positional args passed to _parse_parametrize_args
2019-06-24 20:43:52 -04:00
Bruno Oliveira
f43fb13179
Include pytest version in the cached pyc tags
...
Fix #1671
2019-06-24 20:37:07 -03:00
Bruno Oliveira
3f5b078462
Merge pull request #5441 from nicoddemus/faulthandler-5440
...
Integrate pytest-faulthandler into the core
2019-06-24 20:01:15 -03:00
Bruno Oliveira
63c4802be0
minor: clarify help with reportchars ( #5475 )
...
minor: clarify help with reportchars
2019-06-24 19:59:15 -03:00
Anthony Sottile
a24933b0a6
Merge pull request #5481 from asottile/minor_py3_cleanup
...
Use new raise syntax in one case
2019-06-24 12:06:53 -07:00
Anthony Sottile
380ca8f880
Use new raise syntax in one case
2019-06-24 11:24:03 -07:00
Anthony Sottile
61dcb84f0d
Merge pull request #5468 from asottile/switch_importlib_to_imp
...
Switch from deprecated imp to importlib
2019-06-24 11:22:01 -07:00
Anthony Sottile
4cd08f9b52
Switch from deprecated imp to importlib
2019-06-24 09:48:38 -07:00
Victor Maryama
52e695b329
Removed debug code.
2019-06-24 17:47:48 +02:00
Victor Maryama
9a89783fbb
Assertion passed hook
2019-06-24 16:09:39 +02:00
Daniel Hahler
01a094cc43
minor: clarify help with reportchars
...
`-ra` / `-rA` will include "w" also. This does not explicitly mention
it (allowing for change the behavior), but makes it a) clearer that "w"
is a recognized reportchar, and b) less confusing that `-ra
--disable-warnings` still displays them.
2019-06-24 06:07:52 +02:00
Bruno Oliveira
3ce31b6370
Change pytest-faulthandler for simplification
...
* The --no-faulthandler option is not necessary given that we can use
`-p no:faulthandler`.
* The `--faulthandler-timeout` command-line option has become an ini
option, for the reasons described in
https://github.com/pytest-dev/pytest-faulthandler/issues/34 and
users can still set it from the command-line.
Fix pytest-dev/pytest-faulthandler#34
2019-06-22 19:22:43 -03:00
Bruno Oliveira
3d01dd3adf
Update cache.rst ( #5465 )
...
Update cache.rst
2019-06-21 21:12:30 -03:00
Bruno Oliveira
a37b902afe
Integrate pytest-faulthandler into the core
...
* Add pytest-faulthandler files unchanged
* Adapt imports and tests
* Add code to skip registration of the external `pytest_faulthandler`
to avoid conflicts
Fix #5440
2019-06-21 21:02:24 -03:00
curiousjazz77
12b76b6261
Update cache.rst
2019-06-21 15:48:59 -07:00
Bruno Oliveira
b713460cc7
fix typos in the resolution of #5125 ( #5458 )
...
fix typos in the resolution of #5125
2019-06-17 16:55:26 -03:00
Ronny Pfannschmidt
0627d92df2
fix typos in the resolution of #5125
2019-06-17 20:35:23 +02:00
Bruno Oliveira
b38a4e8e11
Fix stepwise crash when first collected module fails ( #5446 )
...
Fix stepwise crash when first collected module fails
2019-06-16 10:43:18 -03:00
Bruno Oliveira
689ce112e7
Small cleanups on _pytest.compat ( #5451 )
...
Small cleanups on _pytest.compat
2019-06-16 10:42:07 -03:00
Bruno Oliveira
87fc5a5455
Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types' ( #5452 )
...
Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types'
2019-06-16 10:41:40 -03:00
Bruno Oliveira
bbfc8d1501
conversion of exit codes to enum + exposure ( #5420 )
...
conversion of exit codes to enum + exposure
2019-06-16 10:41:18 -03:00
Bruno Oliveira
ab6ed381ac
Improve ExitCode docstring
2019-06-15 20:53:46 -03:00
Ronny Pfannschmidt
1cfea5f1b3
add ExitCode reference in usage
2019-06-15 21:41:55 +02:00
Daniel Hahler
cf27af734e
Merge pull request #5404 from Zac-HD/helpful-mock-unwrapper
...
Emit warning for broken object
2019-06-15 18:54:03 +02:00
Ronny Pfannschmidt
8b3b10b14b
pre-commit
2019-06-15 17:41:13 +02:00
Ronny Pfannschmidt
103d6146b0
document exitcode members
2019-06-15 17:18:21 +02:00
Ronny Pfannschmidt
065fa17124
update cangelog to fit review suggestion
2019-06-15 17:03:40 +02:00
Bruno Oliveira
43e8576ca3
Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types'
...
When we configure warnings as errors, users see error messages like this:
def test():
> warnings.warn(pytest.PytestWarning("some warning"))
E _pytest.warning_types.PytestWarning: some warning
This is a problem because suggests the user should use `_pytest.warning_types.PytestWarning` to configure
their warning filters, which is not nice.
This commit changes the message to:
def test():
> warnings.warn(pytest.PytestWarning("some warning"))
E pytest.PytestWarning: some warning
2019-06-15 11:48:34 -03:00
Bruno Oliveira
d8fa434d39
Remove Python 2-only workaround
2019-06-15 10:45:16 -03:00
Bruno Oliveira
177af032d2
Remove unused/unneeded code
2019-06-15 10:45:16 -03:00
Bruno Oliveira
355eb5adfb
Small cleanups on _pytest.compat
...
Small improvements and cleanups
2019-06-15 10:06:37 -03:00
Ronny Pfannschmidt
2bd619ecb0
add changelog
2019-06-15 07:05:18 +02:00
Ronny Pfannschmidt
2b92fee1c3
initial conversion of exit codes to enum
2019-06-15 06:48:00 +02:00
Anthony Sottile
240828d912
Merge pull request #5448 from nicoddemus/add-hooks
...
Remove broken/unused PytestPluginManager.addhooks
2019-06-14 21:45:11 -07:00
Bruno Oliveira
c94e9b6145
Fix test docstring
2019-06-13 23:10:13 -03:00
Bruno Oliveira
7513d87b15
Remove broken/unused PytestPluginManager.addhooks
...
The function has been deprecated for ages and
the PLUGIN_MANAGER_ADDHOOKS constant doesn't even exist since 3.0.
Because the function is clearly broken, this change doesn't even
require a CHANGELOG.
2019-06-13 19:55:13 -03:00
Bruno Oliveira
bc345ac980
Remove handling of collection errors by --sw
...
Since then pytest itself adopted the behavior of interrupting
the test session on collection errors, so --sw no longer needs
to handle this.
The --sw behavior seems have been implemented when pytest
would continue execution even if there were collection errors.
2019-06-13 17:19:36 -03:00
Bruno Oliveira
4cc05a657d
Fix --sw crash when first file in cmdline fails to collect
...
Fix #5444
2019-06-13 16:47:01 -03:00
Thomas Grainger
ad15efc7ea
add test for stepwise attribute error Refs: #5444
2019-06-13 12:39:49 +01:00
Bruno Oliveira
e3dcf1f39d
Merge pull request #5442 from patriksevallius/master
...
Add missing 'e' to test_mod(e).
2019-06-13 08:23:53 -03:00
patriksevallius
701d0351a6
Add missing 'e' to test_mod(e).
2019-06-13 06:01:30 +02:00
Bruno Oliveira
bad7ab721a
Minor: tox: coverage: use -m with coverage-report ( #5427 )
...
Minor: tox: coverage: use -m with coverage-report
2019-06-12 19:44:15 -03:00
Anthony Sottile
ede8b87560
Merge pull request #5438 from nicoddemus/result-log-deprecation
...
Postpone removal of --result-log to pytest 6.0
2019-06-12 10:45:02 -07:00
Bruno Oliveira
52780f39ce
Postpone removal of --result-log to pytest 6.0
...
As we did not provide an alternative yet, it is better to postpone
the actual removal until we have provided a suitable and stable
alternative.
Related to #4488
2019-06-12 08:26:11 -03:00
Bruno Oliveira
d637d1b2ac
Merge pull request #5435 from asottile/release-4.6.3 ( #5436 )
...
Merge pull request #5435 from asottile/release-4.6.3
2019-06-11 21:24:45 -03:00
Anthony Sottile
47447963b7
Merge pull request #5437 from asottile/reenable_pypy3
...
re-enable pypy3
2019-06-11 12:21:53 -07:00
Anthony Sottile
f586d627b3
re-enable pypy3 now that importlib-metadata 0.18 is released
2019-06-11 10:54:16 -07:00
Anthony Sottile
108fad1ac0
Revert "ci: Travis: remove pypy3 job for now"
...
This reverts commit 47022b36cb .
2019-06-11 10:53:32 -07:00
Anthony Sottile
18c2ff6625
Merge pull request #5435 from asottile/release-4.6.3
...
Preparing release version 4.6.3
2019-06-11 09:59:05 -07:00
Zac-HD
c5a549b5bb
Emit warning for broken object
2019-06-09 22:17:40 +10:00
Daniel Hahler
75cda6de53
tox: coverage: use -m with coverage-report
2019-06-09 12:51:32 +02:00
Daniel Hahler
e868bb647d
remove commented code
2019-06-09 12:51:32 +02:00
Daniel Hahler
40c5a9d9f2
Merge pull request #5409 from blueyed/twisted
...
ci: optimize twisted/numpy related jobs
2019-06-09 12:49:41 +02:00
Anthony Sottile
83d18096d4
Merge pull request #5421 from nicoddemus/raises-warning-message
...
Link deprecation docs pytest.raises 'message' warning
2019-06-08 12:44:40 -07:00
Daniel Hahler
28aa38ece6
ci: optimize twisted/pexpect related jobs
...
- tox: use twisted as dep only
- Azure: move twisted/numpy to main py37 job
- Travis: move twisted to main py37 build
2019-06-08 19:21:56 +02:00
Bruno Oliveira
f0cee593f2
Link deprecation docs pytest.raises 'message' warning
...
As commented in https://github.com/pytest-dev/pytest/issues/3974#issuecomment-499870914
2019-06-07 14:14:46 -03:00
Daniel Hahler
4f597f011d
Merge pull request #5419 from blueyed/remove-pypy3
...
ci: Travis: remove pypy3 job for now
2019-06-07 18:05:59 +02:00
Bruno Oliveira
9f5c356784
Remove ExceptionInfo.__str__, falling back to __repr__ ( #5413 )
...
Remove ExceptionInfo.__str__, falling back to __repr__
2019-06-07 08:48:03 -03:00
Daniel Hahler
47022b36cb
ci: Travis: remove pypy3 job for now
...
Ref: https://github.com/pytest-dev/pytest/issues/5317#issuecomment-499019928
2019-06-07 11:01:23 +02:00
Bruno Oliveira
042a10f2e2
Add slow marker in run/skip option example. ( #5416 )
...
Add `slow` marker in run/skip option example.
2019-06-06 15:00:04 -03:00
Anthony Sottile
0405697a78
Merge pull request #5415 from asottile/small_mypy_fixes
...
small mypy fixes
2019-06-06 10:47:58 -07:00
Ralph Giles
918268774b
Add slow marker in run/skip option example.
...
The example implementation of a `--runslow` option results in
a `PytestUnknownMarkWarning`. Include registering the custom
mark in the example, based on the documentation in markers.rst.
2019-06-06 10:15:43 -07:00
Anthony Sottile
ccd87f9e80
small mypy fixes
2019-06-06 09:13:02 -07:00
Bruno Oliveira
65c2a81924
Remove ExceptionInfo.__str__, falling back to __repr__
...
Fix #5412
2019-06-06 12:20:32 -03:00
Bruno Oliveira
450d264623
ci: move coverage reporting to shared script ( #5403 )
...
ci: move coverage reporting to shared script
2019-06-06 12:04:32 -03:00
Daniel Hahler
0fd1f3038c
ci: move coverage reporting to shared script
2019-06-06 16:31:39 +02:00
Bruno Oliveira
9f8b566ea9
Turn PytestDeprecationWarning into error ( #5410 )
...
Turn PytestDeprecationWarning into error
2019-06-05 22:20:14 -03:00
Bruno Oliveira
3656885d0d
Fix verbosity bug in --collect-only ( #5391 )
...
Fix verbosity bug in --collect-only
2019-06-05 20:47:59 -03:00
Thomas Hisch
577b0dffe7
Fix verbosity bug in --collect-only
2019-06-05 20:10:16 -03:00
Bruno Oliveira
8f5cb461a8
Turn PytestDeprecationWarning into error
...
Fix #5402
2019-06-05 19:02:52 -03:00
Daniel Hahler
be84ba8a33
Merge pull request #5396 from blueyed/travis-py37-nocov
...
Revert "Enable coverage for 'py37' environment"
2019-06-05 12:40:46 +02:00
Daniel Hahler
d9eafbdee3
Revert "Enable coverage for 'py37' environment"
...
This reverts commit 6d393c5dc8 .
It should not be necessary, because we have it via other jobs already.
2019-06-05 12:12:58 +02:00
Daniel Hahler
190456aeda
Merge pull request #5406 from blueyed/restore-tracing
...
tests: restore tracing function
2019-06-05 11:50:56 +02:00
Daniel Hahler
aab5687093
tests: restore tracing function
...
Without this, `testing/test_pdb.py` (already without pexpect) will cause
missing test coverage afterwards (for the same process).
2019-06-05 11:26:48 +02:00
Anthony Sottile
5fdc2d7744
Merge pull request #5400 from asottile/prefixes
...
Clean up u' prefixes and py2 bytes conversions
2019-06-04 19:03:12 -07:00
Anthony Sottile
25cef55e4a
Merge pull request #5398 from nicoddemus/kwargs-refactoring
...
Use keyword-only arguments in a few places
2019-06-04 18:21:44 -07:00
Anthony Sottile
be2be040f9
Clean up u' prefixes and py2 bytes conversions
2019-06-04 17:50:34 -07:00
Anthony Sottile
0f4992c223
Merge pull request #5393 from nicoddemus/unittest-self-5390
...
item.obj is again a bound method on TestCase function items
2019-06-04 17:48:48 -07:00
Bruno Oliveira
23cd68b667
Use keyword-only arguments in a few places
2019-06-04 21:10:59 -03:00
Bruno Oliveira
79ef04888e
Merge pull request #5389 from dirk-thomas/patch-1
...
fix logic if importlib_metadata.PathDistribution.files is None [breaks pytest 4.6.0|1|2]
2019-06-04 20:25:21 -03:00
Bruno Oliveira
1f8fd421c4
item.obj is again a bound method on TestCase function items
...
Fix #5390
2019-06-04 20:22:49 -03:00
Bruno Oliveira
76d50801fd
Allow pypy3 failures again ( #5394 )
...
Allow pypy3 failures again
2019-06-04 20:22:25 -03:00
Bruno Oliveira
9349c72cac
Allow pypy3 failures again
...
Related to #5317
2019-06-04 20:17:51 -03:00
Bruno Oliveira
883db6a216
Add test for packages with broken metadata
...
Related to #5389
2019-06-04 17:04:15 -03:00
Dirk Thomas
898e869bcd
add changelog file for #5389
2019-06-04 10:55:38 -07:00
Dirk Thomas
0a91e181af
fix logic if importlib_metadata.PathDistribution.files is None
2019-06-04 10:41:58 -07:00
Bruno Oliveira
6a6b6d8195
Remove --recreate from .travis.yml ( #5384 )
...
Remove --recreate from .travis.yml
2019-06-03 22:18:17 -03:00
Anthony Sottile
b95bb29fc2
Remove --recreate from .travis.yml
...
Looks like this has been in the history since the beginning of time, but we should always get a blank slate anyway
Noticed this in https://github.com/crsmithdev/arrow/pull/597
2019-06-03 16:31:06 -07:00
Bruno Oliveira
2a3d643bdf
Documentation: expansion of Monkeypatch to include mocked classes and dictionaries ( #5315 )
...
Documentation: expansion of Monkeypatch to include mocked classes and dictionaries
2019-06-03 19:30:29 -03:00
Bruno Oliveira
2cfd9c259f
Revert "ci: Travis: add pypy3 to allowed failures temporarily" ( #5378 )
...
Revert "ci: Travis: add pypy3 to allowed failures temporarily"
2019-06-03 17:59:24 -03:00
Bruno Oliveira
927e95c65a
[release notes] Merge pull request #5379 from asottile/release-4.6.2 ( #5380 )
...
[release notes] Merge pull request #5379 from asottile/release-4.6.2
2019-06-03 16:35:21 -03:00
Anthony Sottile
9657166a22
Merge pull request #5379 from asottile/release-4.6.2
...
Preparing release version 4.6.2
2019-06-03 12:19:42 -07:00
Bruno Oliveira
f223d26111
Add a new Exceptions section in documentation and document UsageError ( #5231 )
...
Add a new Exceptions section in documentation and document UsageError
2019-06-03 14:41:04 -03:00
Pulkit Goyal
1d6bbab2b0
Add a new Exceptions section in documentation and document UsageError
2019-06-03 14:23:56 -03:00
Daniel Hahler
606d728697
Revert "Revert "Revert "ci: Travis: add pypy3 to allowed failures temporarily"""
2019-06-03 18:54:40 +02:00
Daniel Hahler
3a8b08275d
Merge pull request #5377 from blueyed/pypy3
...
Revert "Revert "ci: Travis: add pypy3 to allowed failures temporarily""
2019-06-03 18:33:57 +02:00
Daniel Hahler
e770db4c91
Revert "Revert "ci: Travis: add pypy3 to allowed failures temporarily""
...
This reverts commit a6dc283133 .
2019-06-03 18:30:50 +02:00
Anthony Sottile
63099bc282
Merge pull request #5373 from asottile/revert_all_handling
...
Revert unrolling of `all()`
2019-06-03 09:18:47 -07:00
Bruno Oliveira
4f57d40a43
Merge master into features ( #5374 )
...
Merge master into features
2019-06-03 13:14:31 -03:00
Anthony Sottile
230f736fcd
Add changelog entries for reverting all() handling
2019-06-03 08:42:03 -07:00
Anthony Sottile
1b381d5277
Revert "Unroll calls to any #5062 ( #5103 )"
...
This reverts commit 2b9ca34280 , reversing
changes made to 0a57124063 .
2019-06-03 08:42:03 -07:00
Anthony Sottile
2125d04501
Revert "Fix all() unroll for non-generators/non-list comprehensions ( #5360 )"
...
This reverts commit 733f43b02e , reversing
changes made to e4fe41ebb7 .
2019-06-03 08:42:03 -07:00
Anthony Sottile
5976f36240
Merge pull request #5368 from asottile/pyupgrade
...
Automated / semi-automated python3 upgrades
2019-06-03 08:41:37 -07:00
Bruno Oliveira
ce78c9adef
Fix linting
2019-06-03 12:08:50 -03:00
Bruno Oliveira
6d393c5dc8
Enable coverage for 'py37' environment
2019-06-03 12:08:02 -03:00
Anthony Sottile
8292644015
Allow multiple positions for the SyntaxError in pypy3.6
2019-06-03 12:08:02 -03:00
Anthony Sottile
96fd44e040
Update line number for warning
2019-06-03 12:08:02 -03:00
Anthony Sottile
5dcf85c17e
manual: remove dependence on six
2019-06-03 12:08:02 -03:00
Anthony Sottile
ca1efd57bd
git rm src/_pytest/_code/_py2traceback.py
2019-06-03 12:08:02 -03:00
Anthony Sottile
c63320cc31
codecs.open / io.open
2019-06-03 12:08:02 -03:00
Anthony Sottile
4df529e5b9
Clean up __future__ and coding: in tests
2019-06-03 12:08:02 -03:00
Anthony Sottile
a91fe1fedd
pre-commit run pyupgrade --all-files
2019-06-03 12:08:02 -03:00
Anthony Sottile
3f1ec520fc
pre-commit run reorder-python-imports --all-files
2019-06-03 12:08:01 -03:00
Anthony Sottile
5034399d7a
pre-commit run fix-encoding-pragma --all-files
2019-06-03 12:08:01 -03:00
Anthony Sottile
99057555e1
manual changes to .pre-commit-config.yaml
2019-06-03 12:08:01 -03:00
Thomas Hisch
b8781ff868
Merge pull request #5335 from thisch/fmtregex
...
logging: Extend LEVELNAME_FMT_REGEX
2019-06-03 05:55:36 +02:00
Thomas Hisch
ef053193b5
logging: Extend LEVELNAME_FMT_REGEX
2019-06-03 05:53:19 +02:00
Bruno Oliveira
28ac469eaa
Merge pull request #5367 from apollovy/master
...
Fix typo about interpreters count in doc/en/example/parametrize.html
2019-06-02 20:43:53 -03:00
Bruno Oliveira
5999782768
Use python 3 interpreters in example
2019-06-02 19:20:00 -03:00
Bruno Oliveira
6e68532bb3
Merge pull request #5362 from asottile/release-4.6.1 ( #5365 )
...
Merge pull request #5362 from asottile/release-4.6.1
2019-06-02 19:17:29 -03:00
Bruno Oliveira
602a290fcc
Drop py27 and py34 support ( #5318 )
...
Drop py27 and py34 support
2019-06-02 19:14:54 -03:00
Bruno Oliveira
876df87672
Update release instructions for 4.6-maintenance ( #5363 )
...
Update release instructions for 4.6-maintenance
2019-06-02 19:14:26 -03:00
Bruno Oliveira
b7f8f53127
Revert "ci: Travis: add pypy3 to allowed failures temporarily" ( #5364 )
...
Revert "ci: Travis: add pypy3 to allowed failures temporarily"
2019-06-02 19:12:39 -03:00
Yuri Apollov
5c016d1021
Fix typo about interpreters count in doc/en/example/parametrize.html
2019-06-02 23:57:22 +03:00
Anthony Sottile
25e728c78b
Update release instructions for 4.6-maintenance
2019-06-02 11:50:07 -07:00
Anthony Sottile
642ef6dc1b
Merge pull request #5362 from asottile/release-4.6.1
...
Preparing release version 4.6.1
2019-06-02 11:47:26 -07:00
Daniel Hahler
a6dc283133
Revert "ci: Travis: add pypy3 to allowed failures temporarily"
...
This reverts commit 5ac498ea96 .
The idea is that maybe https://github.com/pytest-dev/pytest/pull/5360
fixes the failures here also.
2019-06-02 20:19:34 +02:00
Bruno Oliveira
4d49ba6529
Drop Python 2.7 and 3.4 support
...
* Update setup.py requires and classifiers
* Drop Python 2.7 and 3.4 from CI
* Update docs dropping 2.7 and 3.4 support
* Fix mock imports and remove tests related to pypi's mock module
* Add py27 and 34 support docs to the sidebar
* Remove usage of six from tmpdir
* Remove six.PY* code blocks
* Remove sys.version_info related code
* Cleanup compat
* Remove obsolete safe_str
* Remove obsolete __unicode__ methods
* Remove compat.PY35 and compat.PY36: not really needed anymore
* Remove unused UNICODE_TYPES
* Remove Jython specific code
* Remove some Python 2 references from docs
Related to #5275
2019-06-02 14:39:11 -03:00
Bruno Oliveira
733f43b02e
Fix all() unroll for non-generators/non-list comprehensions ( #5360 )
...
Fix all() unroll for non-generators/non-list comprehensions
2019-06-02 12:51:43 -03:00
Bruno Oliveira
acdf30a523
Fix all() unroll for non-generators/non-list comprehensions
...
Fix #5358
2019-06-02 12:12:14 -03:00
Anthony Sottile
e4fe41ebb7
Merge pull request #5356 from asottile/fix_parametrize_iterator
...
Fix `pytest.mark.parametrize` when the argvalue is an iterator
2019-06-01 15:09:43 -07:00
Anthony Sottile
cafb13c95f
Fix pytest.mark.parametrize when the argvalue is an iterator
2019-06-01 15:09:17 -07:00
Bruno Oliveira
a8f4e56d8c
Docs: Fix link anchor ( #5355 )
...
Docs: Fix link anchor
2019-06-01 19:09:04 -03:00
Hugo
e2ac4b782a
Fix link anchor
2019-06-01 23:27:20 +03:00
Anthony Sottile
917195ea8e
Merge pull request #5350 from asottile/release-4.6.0
...
Release 4.6.0
2019-06-01 11:10:57 -07:00
Anthony Sottile
e7cd00ac92
Preparing release version 4.6.0
2019-05-31 23:12:57 -07:00
Daniel Hahler
693c3b7f61
Merge pull request #5349 from asottile/mm
...
Merge master into features
2019-05-31 06:35:00 +02:00
Anthony Sottile
fb3ae5eaa9
Merge remote-tracking branch 'origin/master' into mm
2019-05-30 20:23:38 -07:00
Bruno Oliveira
c8d23c206b
logging: Improve formatting of multiline message ( #5312 )
...
logging: Improve formatting of multiline message
2019-05-30 21:42:41 -03:00
Bruno Oliveira
c5de8e8c50
ci: Travis: add pypy3 to allowed failures temporarily ( #5340 )
...
ci: Travis: add pypy3 to allowed failures temporarily
2019-05-30 21:37:55 -03:00
Bruno Oliveira
f360147758
Avoiding looking upwards for parameter argnames when generating fixtu… ( #5254 )
...
Avoiding looking upwards for parameter argnames when generating fixtu…
2019-05-30 21:08:15 -03:00
Victor Maryama
65bd1b8a93
Avoiding looking upwards for parameter argnames when generating fixtureinfo.
2019-05-30 23:42:04 +02:00
Daniel Hahler
882f3a4cd7
Merge pull request #5306 from blueyed/spawn-home
...
pytester: use temporary HOME with spawn
2019-05-30 20:46:17 +02:00
Anthony Sottile
56e430f74e
Merge pull request #5338 from nicoddemus/junit_log_passing_tests-ref-docs
...
Add missing junitxml ini options to the reference docs
2019-05-30 10:29:56 -07:00
Anthony Sottile
654d8da9f7
Merge pull request #5346 from nicoddemus/improve-collect-warn-message
...
Show test module in the PytestCollectionWarning message
2019-05-30 10:27:52 -07:00
Daniel Hahler
ace3a02cd4
pytester: factor out testdir._env_run_update
2019-05-30 17:39:44 +02:00
Daniel Hahler
f013a5e8c1
pytester: use temporary HOME with spawn
...
Followup to https://github.com/pytest-dev/pytest/issues/4956 .
2019-05-30 17:39:44 +02:00
Bruno Oliveira
fbd8ff9502
Merge master into features ( #5339 )
...
Merge master into features
2019-05-30 12:21:51 -03:00
Daniel Hahler
737a1bf947
Merge pull request #5341 from blueyed/auto-slow
...
tests: conftest: auto-add slow marker
2019-05-30 17:01:43 +02:00
Bruno Oliveira
843ca03770
Merge pull request #5343 from blueyed/remove-winpymap
...
pytester: remove unused winpymap
2019-05-30 09:21:51 -03:00
Bruno Oliveira
5cbc06a453
Show test module in the PytestCollectionWarning message
...
Related to #5330
2019-05-30 08:18:28 -03:00
Daniel Hahler
da23aa3419
pytester: remove unused winpymap
...
Follow-up to c86d2daf8 .
2019-05-30 08:09:49 +02:00
Daniel Hahler
28bf3816e7
tests: conftest: auto-add slow marker
2019-05-30 06:55:38 +02:00
Daniel Hahler
d6ce2e5858
Merge pull request #5322 from blueyed/pdb-wrapper
...
pdb: move/refactor initialization of PytestPdbWrapper
2019-05-30 06:39:25 +02:00
Daniel Hahler
5ac498ea96
ci: Travis: add pypy3 to allowed failures temporarily
...
Ref: https://github.com/pytest-dev/pytest/pull/5334
Ref: https://github.com/pytest-dev/pytest/issues/5317
2019-05-30 06:37:53 +02:00
Daniel Hahler
6765aca0d1
Merge master into features
2019-05-30 06:33:04 +02:00
Daniel Hahler
72fc43952b
Merge pull request #5336 from blueyed/fix-pexpect
...
Fix pexpect tests on MacOS
2019-05-30 06:31:11 +02:00
Daniel Hahler
6896dbc5ca
tox: pexpect: use "-m uses_pexpect"
2019-05-30 03:52:41 +02:00
Daniel Hahler
49c6aebbc7
ci: Travis: test with pexpect on macos
...
Uses `PYTEST_COVERAGE=1` already, which will come in via dropping
Python 2 soon anyway.
2019-05-30 03:51:33 +02:00
Daniel Hahler
fb12d2a612
test_enter_leave_pdb_hooks_are_called: remove child.sendeof()
2019-05-30 03:09:36 +02:00
Daniel Hahler
8e51563384
tests: pdb: flush also on MacOS, but read() before
...
Ref: https://github.com/pytest-dev/pytest/issues/2022
2019-05-30 03:09:36 +02:00
Daniel Hahler
61dfd0a94f
pdb: move/refactor initialization of PytestPdbWrapper
2019-05-30 03:00:07 +02:00
Bruno Oliveira
f9cafd1c94
Add missing junitxml ini options to the reference docs
2019-05-29 21:13:16 -03:00
Bruno Oliveira
b10f28949d
Add the junit_log_passing_tests ini flag to skip logging output for passing tests. ( #5052 )
...
Add the junit_log_passing_tests ini flag to skip logging output for passing tests.
2019-05-29 20:56:13 -03:00
Bruno Oliveira
b0f090890c
Merge master into features ( #5332 )
...
Merge master into features
2019-05-29 20:39:27 -03:00
Daniel Hahler
f0a4a13e48
Merge pull request #5333 from blueyed/fix-lf
...
Fix regression with --lf and non-selected failures
2019-05-30 01:24:07 +02:00
Daniel Hahler
ff80464b47
last-failed: display skipped-files msg always
2019-05-29 23:32:52 +02:00
Daniel Hahler
480dd9e6d6
last_failed_paths: improve caching
2019-05-29 23:28:58 +02:00
Daniel Hahler
ceb4f3f701
fixup! Fix regression with --lf and non-selected failures
2019-05-29 23:24:52 +02:00
Thomas Hisch
ea3ebec117
logging: Improve formatting of multiline message
2019-05-29 23:21:14 +02:00
Daniel Hahler
bf3b26b3f7
Fix regression with --lf and non-selected failures
2019-05-29 22:44:43 +02:00
Thomas Hisch
84569ca4da
Merge pull request #5311 from thisch/coloredcaplog
...
Use same code for setting up cli/non-cli formatter
2019-05-29 22:18:43 +02:00
Daniel Hahler
af21e6b45c
Merge master into features
...
(dropping the temporary pinning of pluggy (2e2e895b4 ))
2019-05-29 22:15:25 +02:00
Daniel Hahler
5c5966f62d
Merge pull request #5331 from blueyed/conftest
...
tests: conftest: fix collection of slow/slowest items
2019-05-29 22:13:52 +02:00
Thomas Hisch
31b1c4ca0c
Update changelog/5311.feature.rst
...
Co-Authored-By: Daniel Hahler <github@thequod.de >
2019-05-29 22:00:34 +02:00
Daniel Hahler
61b76c7f5f
tests: conftest: fix collection of slow/slowest items
2019-05-29 21:35:05 +02:00
Bruno Oliveira
c35544a0f7
conftest: add uses_pexpect mark ( #5314 )
...
conftest: add uses_pexpect mark
2019-05-28 20:00:36 -03:00
Bruno Oliveira
5bc3ad8e27
minor: getbasetemp: dedent, improve assert ( #5327 )
...
minor: getbasetemp: dedent, improve assert
2019-05-28 19:59:43 -03:00
Bruno Oliveira
a930ca0b45
Remove _pytest.compat.NoneType ( #5326 )
...
Remove _pytest.compat.NoneType
2019-05-28 19:58:17 -03:00
Thomas Hisch
d4b85da8c7
Use same code for setting up cli/non-cli formatter
...
A method _create_formatter was introduced that is used for both the
log_cli_formatter and the log_formatter.
Consequences of this commit are:
* Captured logs that are output for each failing test are formatted
using the ColoredLevelFromatter.
* The formatter used for writing to a file still uses the non-colored
logging.Formatter class.
2019-05-28 21:30:34 +02:00
Daniel Hahler
0025e4408f
conftest: add uses_pexpect mark
2019-05-28 18:41:01 +02:00
Anthony Sottile
81cc73103a
Merge pull request #5325 from asottile/temporary
...
Temporarily pin pluggy on master
2019-05-28 09:37:04 -07:00
Daniel Hahler
97d8e9fbec
minor: getbasetemp: dedent, improve assert
2019-05-28 18:26:10 +02:00
Daniel Hahler
220a2a1bc9
Remove _pytest.compat.NoneType
2019-05-28 18:16:18 +02:00
Anthony Sottile
2e2e895b4b
Temporarily pin pluggy on master
2019-05-28 09:02:23 -07:00
Bruno Oliveira
bce45052a6
Correct some tiny typos in changelog ( #5323 )
...
Correct some tiny typos in changelog
2019-05-28 12:41:05 -03:00
Anthony Sottile
2f48ae4e66
Correct some tiny typos in changelog
2019-05-28 08:11:18 -07:00
Evan Kepner
2dfbed11b4
fix path expansion example
2019-05-27 23:23:18 -04:00
Evan Kepner
24c95c78e7
add updated monkeypatch examples
2019-05-27 20:55:15 -04:00
Daniel Hahler
6061ecf95a
Merge master into features ( #5319 )
2019-05-28 02:15:15 +02:00
Daniel Hahler
e032904413
Merge master into features
2019-05-28 01:46:16 +02:00
Bruno Oliveira
ece774f0eb
pdb: import pdbcls lazily ( #5307 )
...
pdb: import pdbcls lazily
2019-05-27 20:23:39 -03:00
Bruno Oliveira
bc49d6ff99
Update docs about py27 and py34 support plans ( #5316 )
...
Update docs about py27 and py34 support plans
2019-05-27 20:22:31 -03:00
Bruno Oliveira
2b9ca34280
Unroll calls to any #5062 ( #5103 )
...
Unroll calls to any #5062
2019-05-27 20:17:44 -03:00
Bruno Oliveira
e38561037d
Update docs about py27 and py34 support plans
...
As discussed in #5275
2019-05-27 19:28:27 -03:00
Anthony Sottile
0a57124063
Merge pull request #5063 from asottile/importlib_metadata_v2
...
Switch to importlib-metadata
2019-05-27 15:00:12 -07:00
Anthony Sottile
13f02af97d
Switch to importlib-metadata
2019-05-27 13:24:08 -07:00
Daniel Hahler
f2ed796c41
pdb: import pdbcls lazily
...
Fixes https://github.com/pytest-dev/pytest/issues/2064 .
2019-05-26 15:56:38 +02:00
Anthony Sottile
b3f8fabac8
Merge pull request #5308 from blueyed/minor
...
Minor fixes
2019-05-25 21:58:39 -07:00
Tomer Keren
22d91a3c3a
Unroll calls to all on python 2
2019-05-25 19:34:08 +03:00
Tomer Keren
322a0f0a33
Fix mention of issue #5062 in docstrings
2019-05-25 19:34:08 +03:00
Tomer Keren
58149459a5
Mark visit_all as a private method
2019-05-25 19:34:08 +03:00
Tomer Keren
852fb6a4ae
Change basic test case to be consistent with existing assertion rewriting
...
The code
```
x = 0
assert x == 1
```
will give the failure message 0 == 1, so it shouldn't be different as
part of an unroll
2019-05-25 19:34:08 +03:00
Tomer Keren
437d6452c1
Expand list comprehensions as well
2019-05-25 19:34:08 +03:00
Tomer Keren
e37ff3042e
Check calls to all only if it's a name and not an attribute
2019-05-25 19:34:08 +03:00
Tomer Keren
ecd2de25a1
Revert "Displaying pip list command's packages and versions #5062 "
...
This reverts commit 043fdb7c40 .
These tests were part of the PR #5155 but weren't relevant to #5602
2019-05-25 19:34:08 +03:00
danielx123
c607697400
Fixed test case
2019-05-25 19:34:08 +03:00
danielx123
0996f3dbc5
Displaying pip list command's packages and versions #5062
2019-05-25 19:34:08 +03:00
danielx123
a0dbf2ab99
Adding test cases for unrolling an iterable #5062
2019-05-25 19:34:08 +03:00
Tomer Keren
ddbe733666
Add changelog entry for 5062
2019-05-25 19:34:08 +03:00
Tomer Keren
470e686a70
Rewrite unrolled assertion with a new rewriter,correctly append the unrolled for loop
2019-05-25 19:34:08 +03:00
Tomer Keren
765f75a8f1
Replace asserts of any with an assert in a for
2019-05-25 19:34:08 +03:00
Tomer Keren
6b5152ae13
Sanity tests for loop unrolling
2019-05-25 19:34:08 +03:00
Daniel Hahler
10ca84ffc5
Merge pull request #5119 from blueyed/reportopts-A-order
...
reportopts: A: put "Pp" in front
2019-05-24 18:28:43 +02:00
Bruno Oliveira
e393a73890
Small change to test if pushing directly to master is disabled
2019-05-24 12:11:15 -03:00
Thomas Hisch
bed3918cbc
Revert "logging: Simple impl of multline pretty printing"
...
This reverts commit 31dfbb4668 .
2019-05-24 09:11:03 +02:00
Thomas Hisch
31dfbb4668
logging: Simple impl of multline pretty printing
2019-05-24 09:09:09 +02:00
Bruno Oliveira
b4d75ad31d
Merge pull request #5091 from blueyed/showhelp-ini-options
...
Improve output of ini options in --help
2019-05-23 21:10:43 -03:00
Daniel Hahler
ec6d0fa4d7
Merge pull request #5268 from blueyed/harden-test
...
tests: harden test_nonascii_text
2019-05-24 01:51:35 +02:00
Daniel Hahler
fa8a658458
Merge pull request #4908 from blueyed/pdb-pm-enter-hook
...
pdb: trigger pytest_enter_pdb hook with post-mortem
2019-05-24 01:50:24 +02:00
Bruno Oliveira
66f20b6f5e
Fix invalid Python file encoding "utf8" ( #5252 )
...
Fix invalid Python file encoding "utf8"
2019-05-23 20:24:23 -03:00
Bruno Oliveira
6ba5e3c071
tests: fix test_trace_after_runpytest ( #5245 )
...
tests: fix test_trace_after_runpytest
2019-05-23 19:58:33 -03:00
Bruno Oliveira
b900b4155f
importorskip: display/include ImportError ( #5269 )
...
importorskip: display/include ImportError
2019-05-23 19:25:34 -03:00
Bruno Oliveira
364ae5d723
changelog: Fix typo ( #5304 )
...
changelog: Fix typo
2019-05-23 14:16:49 -03:00
David Röthlisberger
84c7fef836
changelog: Fix typo
2019-05-23 16:48:39 +01:00
Bruno Oliveira
aaea4e52ef
Fix whitespace in FUNDING.yml
2019-05-23 12:44:55 -03:00
Bruno Oliveira
0cacdadc97
Create FUNDING.yml
...
Following instructions from:
* https://tidelift.com/subscription/how-to-connect-tidelift-with-github
* https://help.github.com/en/articles/displaying-a-sponsor-button-in-your-repository#displaying-a-sponsor-button-in-your-repository
2019-05-23 12:36:46 -03:00
Daniel Hahler
6c56070df1
Merge pull request #5278 from blueyed/disable-python-plugin
...
Allow disabling of python plugin
2019-05-23 15:52:19 +02:00
Daniel Hahler
f9f41e69a8
reportopts: A: put "Pp" in front
2019-05-23 09:40:16 +02:00
Daniel Hahler
b2ce6f3200
Improve output of ini options in --help
...
Do not cut long help texts, but wrap them the same way as argparse wraps
the other help items.
2019-05-23 09:33:07 +02:00
Daniel Hahler
e0b584d048
CaptureFixture: do not crash in _suspend when not started
...
This happened in test_pdb_with_caplog_on_pdb_invocation.
2019-05-23 09:09:53 +02:00
Daniel Hahler
a0ff5deabf
pdb: trigger pytest_enter_pdb hook with post-mortem
...
This is required for pytest-pdb to be called with `--pdb`.
TODO:
- [ ] test
- [ ] pass mode to hook, e.g. "post_mortem" in this case?
2019-05-23 09:09:53 +02:00
Daniel Hahler
97b85a17ae
changelog [ci skip]
2019-05-23 08:38:54 +02:00
Anthony Sottile
de7ba5958b
Merge pull request #5294 from akiomik/fix-disable_test_id_escaping-option
...
Fix `disable_test_id_escaping_and_forfeit_all_rights_to_community_support` option when using a list of test IDs
2019-05-21 15:14:45 -07:00
Akiomi Kamakura
8a498700da
Add tests for #5286
2019-05-22 03:56:52 +09:00
Anthony Sottile
45c894b73f
Merge pull request #5297 from nicoddemus/tidelift-contents
...
Add link to tidelift to the main docs
2019-05-21 08:18:07 -07:00
Bruno Oliveira
65342db7a4
Update fixture.rst ( #5295 )
...
Update fixture.rst
2019-05-21 11:57:15 -03:00
Bruno Oliveira
d391274f39
Add link to tidelift to the main docs
...
As commented in:
https://github.com/pytest-dev/pytest/pull/5240#issuecomment-494175451
2019-05-21 11:12:07 -03:00
oleg-yegorov
c5fa1d1c3e
Update fixture.rst
...
add a missing import
2019-05-21 09:40:31 +03:00
Akiomi Kamakura
a304dbb519
Fix disable_test_id_escaping_and_forfeit_all_rights_to_community_support option when using a list of test IDs
2019-05-21 09:48:22 +09:00
Daniel Hahler
d19df5efa2
importorskip: display/include ImportError
...
This can provide useful information, e.g.
> could not import 'pyrepl.readline': curses library not found
2019-05-20 14:13:33 +02:00
Bruno Oliveira
6663cb054c
Fix documentation of pytest.raises(match=...) ( #5288 )
...
Fix documentation of pytest.raises(match=...)
2019-05-19 12:29:02 -03:00
Tim Hoffmann
b27e40cbf1
Fix documentation of pytest.raises(match=...)
2019-05-19 16:01:48 +02:00
Anthony Sottile
ee52a8a5f8
Merge pull request #5287 from clickthisnick/chore-fix-misspellings
...
Fix one misspelling in changelog
2019-05-18 15:30:35 -07:00
MyComputer
8f04bd003c
Fix misspellings
2019-05-18 17:11:23 -04:00
Daniel Hahler
93fd9debe3
Allow disabling of python plugin
...
Fixes https://github.com/pytest-dev/pytest/issues/5277 .
2019-05-17 18:17:14 +02:00
Daniel Hahler
ff428bfee1
tests: harden test_nonascii_text
2019-05-17 18:06:32 +02:00
Daniel Hahler
0f7c7a99bf
Merge pull request #5281 from nicoddemus/merge-master-into-features
...
Merge master into features (make CI green again)
2019-05-17 16:58:16 +02:00
Bruno Oliveira
041ea3704b
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-05-16 20:10:44 -03:00
Anthony Sottile
d94b4b031f
Merge pull request #5271 from nicoddemus/lone-surrogate-jython-5256
...
Handle lone surrogate unicode character not being representable in Jython
2019-05-16 15:02:08 -07:00
Bruno Oliveira
e253029ad0
Handle lone surrogate unicode character not being representable in Jython
...
No tests for this because we don't test with Jython currently.
Fix #5256
2019-05-16 17:59:31 -03:00
Bruno Oliveira
43617a8c47
Disable PyPy on Azure ( #5274 )
...
Disable PyPy on Azure
2019-05-16 17:57:32 -03:00
Bruno Oliveira
56bf7446f6
Disable pypy2 and pypy3 on Azure [travis skip]
...
Related to #5279
2019-05-16 12:20:17 -03:00
Bruno Oliveira
8e42c5b7db
Make it clear that small typos in docs don't require a CHANGELOG entry ( #5276 )
...
Make it clear that small typos in docs don't require a CHANGELOG entry
2019-05-16 12:15:15 -03:00
Bruno Oliveira
0571e1ee8e
Make it clear that small typos in docs don't require a CHANGELOG entry
...
From: https://github.com/pytest-dev/pytest/pull/5273#issuecomment-493076587
2019-05-16 10:54:50 -03:00
Bruno Oliveira
b0a6161d41
Fixed double be word on monkeypatch docs page. ( #5273 )
...
Fixed double `be` word on monkeypatch docs page.
2019-05-16 10:53:08 -03:00
Bruno Oliveira
06fa2bc0b8
Re-enable pypy3 to see how it fares on Azure
2019-05-16 08:10:53 -03:00
Bruno Oliveira
8abd4aec6e
Remove customization of (python.exe) from Azure [skip travis]
...
This is no longer needed it seems
2019-05-16 08:07:59 -03:00
Nikita Krokosh
858010e214
Fixed double be word on monkeypatch docs page.
2019-05-16 18:22:41 +10:00
Bruno Oliveira
96424272a1
Improve mark docs ( #5265 )
...
Improve mark docs
2019-05-15 20:52:21 -03:00
Bruno Oliveira
e44a2ef653
Apply suggestions from code review
...
Co-Authored-By: Daniel Hahler <github@thequod.de >
2019-05-15 20:45:22 -03:00
Bruno Oliveira
c6e3ff3ce5
Mention "-m" in the main mark docs
2019-05-15 20:45:22 -03:00
Bruno Oliveira
a31098a74e
Move section about mark revamp and iteration to historical notes
...
This has been in place for a long time now, since 3.6.
2019-05-15 20:45:22 -03:00
Bruno Oliveira
7e8044f9b8
Revamp the mark section in the docs
...
Add an introductory section about how to register marks,
including doing so programatically (#5255 ).
2019-05-15 20:45:22 -03:00
Anthony Sottile
b81173ea0c
Upgrade pre-commit/pre-commit-hooks
2019-05-15 10:19:12 -07:00
Daniel Hahler
c8f7e50c47
Merge pull request #5262 from asottile/mode_non_binary
...
Remove 'b' from sys.stdout.mode
2019-05-15 10:56:36 +02:00
Daniel Hahler
c0e53a61e6
Merge pull request #5263 from blueyed/mm
...
Merge master to fix CI
2019-05-15 10:55:54 +02:00
Bruno Oliveira
494ac28a32
Merge pull request #5250 from EvanKepner/master
...
Documentation: add setenv/delenv examples to monkeypatch docs
2019-05-14 23:10:58 -03:00
Anthony Sottile
dc75b6af47
Use fix-encoding-pragma pre-commit hook
2019-05-14 15:56:31 -07:00
Bruno Oliveira
7573747cda
Normalize all source encoding declarations
2019-05-14 19:42:44 -03:00
Daniel Hahler
2db05b6582
Merge master into features
2019-05-15 00:11:37 +02:00
Anthony Sottile
4318698bae
Remove 'b' from sys.stdout.mode
2019-05-14 15:00:59 -07:00
Bruno Oliveira
e668aaf885
Fix indentation and use code-block directives
...
The code-block directives are required by our blacken-docs hook
2019-05-14 18:59:27 -03:00
Daniel Hahler
58e6a09db4
Merge pull request #5261 from blueyed/fix-py37-freeze-remove-no-use-pep517
...
ci: tox: fix py37-freeze
2019-05-14 23:57:09 +02:00
Daniel Hahler
6718a2f028
ci: tox: fix py37-freeze
...
Remove ``--no-use-pep517``, which appears to not be supported anymore,
and PyInstaller works without it by now.
2019-05-14 23:49:57 +02:00
Daniel Hahler
c081c01eb1
minor: s/no covers/no cover/
2019-05-14 06:51:49 +02:00
Daniel Hahler
f8e1d58e8f
minor: settrace != set_trace
2019-05-14 06:51:30 +02:00
Raul Tambre
18024467ff
Fix invalid Python file encoding "utf8"
...
Since Python 3 it must be "utf-8", which is the official name.
This is backwards compatible with Python 2.
2019-05-12 19:14:06 +03:00
Evan Kepner
2ad36b1402
add #5250 changelog entry
2019-05-12 10:08:46 -04:00
Evan Kepner
6ca3e1e425
add @EvanKepner to authors
2019-05-12 10:04:24 -04:00
Evan Kepner
ecd072ea94
add env example to monkeypatch docs
2019-05-12 09:52:22 -04:00
Daniel Hahler
dda21935a7
tests: fix test_trace_after_runpytest
...
It was not really testing what it was supposed to test (e.g. the inner
test was not run in the first place).
2019-05-12 09:33:34 +02:00
Bruno Oliveira
cc464f6b96
Merge master into features ( #5248 )
...
Merge master into features
2019-05-11 22:33:44 -03:00
Bruno Oliveira
6a43c8cd94
Release 4.5.0 ( #5246 )
...
Release 4.5.0
2019-05-11 21:40:27 -03:00
Bruno Oliveira
63fe547d9f
Preparing release version 4.5.0
2019-05-11 16:35:32 +00:00
Bruno Oliveira
b709e61892
Merge remote-tracking branch 'upstream/master' into release-4.5.0
2019-05-11 16:30:23 +00:00
Bruno Oliveira
465b2d998a
Further "unknown marks warning" improvements ( #5178 )
...
Further "unknown marks warning" improvements
2019-05-11 13:28:10 -03:00
Bruno Oliveira
184ef92f0b
Introduce record_testsuite_property fixture ( #5205 )
...
Introduce record_testsuite_property fixture
2019-05-11 13:27:14 -03:00
Bruno Oliveira
73bbff2b74
Introduce record_testsuite_property fixture
...
This exposes the functionality introduced in fa6acdc as a session-scoped fixture.
Plugins that want to remain compatible with the `xunit2`
standard should use this fixture instead of `record_property`.
Fix #5202
2019-05-10 19:44:27 -03:00
Floris Bruynooghe
4ccaa987d4
Merge pull request #5240 from nicoddemus/tidelift
...
Add Tidelift management docs and blurb on README, as discussed in the ML
2019-05-10 13:27:57 +02:00
Bruno Oliveira
3a4a815c41
Merge master into features ( #5233 )
...
Merge master into features
2019-05-09 20:13:01 -03:00
Bruno Oliveira
dae455e8a3
Add Tidelift management docs and blurb on README, as discussed in the ML
2019-05-09 20:10:30 -03:00
Bruno Oliveira
0594dba5ce
Remove unused markers and enable --strict-markers
2019-05-09 19:36:39 -03:00
Bruno Oliveira
f1183c2422
Remove the 'issue' marker from test suite
...
It doesn't seem to add much value (why would one execute tests
based on that marker?), plus using the docstring for that
encourages one to write a more descriptive message about the test
2019-05-09 19:36:38 -03:00
Bruno Oliveira
685ca96c71
Change `--strict to --strict-markers`, preserving the old one
...
Fix #5023
2019-05-09 19:36:38 -03:00
Bruno Oliveira
ccf6c3cb46
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-05-09 19:22:40 -03:00
Daniel Hahler
ceca35b94a
Merge pull request #5236 from blueyed/pdb-eoferror-quit
...
pdb: only use outcomes.exit via do_quit
2019-05-09 17:10:36 +02:00
Bruno Oliveira
803d68847b
Pin pluggy to <1.0 ( #5239 )
...
Pin pluggy to <1.0
2019-05-09 11:03:36 -03:00
Bruno Oliveira
0bd02cd1bc
Ignore PytestUnknownMark warning when generating docs ( #5234 )
...
Ignore PytestUnknownMark warning when generating docs
2019-05-09 11:03:20 -03:00
Daniel Hahler
0b8b006db4
minor: improve formatting
2019-05-09 15:36:49 +02:00
Daniel Hahler
73b74c74c9
pdb: only use outcomes.exit via do_quit
...
Fixes https://github.com/pytest-dev/pytest/issues/5235 .
2019-05-09 14:55:55 +02:00
Bruno Oliveira
4d782dc13f
Add CHANGELOG for #5239
2019-05-09 09:00:39 -03:00
Bruno Oliveira
e1756fc631
Pin pluggy to <1.0
...
Make sure we don't update to pluggy 1.0 automatically, as there are planned breaking
changes in the 1.0 release.
2019-05-09 08:47:01 -03:00
Bruno Oliveira
5d7686951c
Run regendoc
2019-05-08 21:50:08 +00:00
Bruno Oliveira
80c5f6e609
Ignore PytestUnknownMark warnings when regen docs
...
A lot of our examples use custom markers to make a point and showcase
features, which generates a lot of warnings
2019-05-08 21:46:26 +00:00
Bruno Oliveira
0b47e51d08
Release version 4.4.2 ( #5230 )
...
Release version 4.4.2
2019-05-08 18:07:05 -03:00
Daniel Hahler
5eeb5ee960
Merge pull request #5013 from blueyed/short-summary-message
...
Display message from reprcrash in short test summary
2019-05-08 22:01:04 +02:00
Daniel Hahler
ed2b715f4c
Merge pull request #5227 from Pulkit07/issue5214
...
logging: improve default logging format (issue5214)
2019-05-08 21:51:54 +02:00
Pulkit Goyal
7e08e09473
logging: improve default logging format (issue5214)
...
We improve the following things in the logging format:
* Show module name instead of just the filename
* show level of logging as the first thing
* show lineno attached to module:file details
Thanks to @blueyed who suggested this on the github issue.
It's my first contribution and I have added myself to AUTHORS.
I also added to a changelog file.
2019-05-08 21:37:59 +03:00
Bruno Oliveira
3ac43314ee
Preparing release version 4.4.2
2019-05-08 12:46:14 -03:00
Bruno Oliveira
972410f8b6
Require pluggy>=0.11 ( #5229 )
...
Require pluggy>=0.11
2019-05-08 12:40:49 -03:00
Romain Chossart
0cf267f187
Add changelog entry for #5229
2019-05-08 16:13:28 +01:00
Sitaktif
7161f5b372
Require pluggy>=0.11
...
Pluggy 0.10.0 introduced a new dependency `importlib-metadata` but that
package cannot be imported when installed as an egg and that is causing
problems for users relying on `setup.py` to install packages present in
`test_require`. This change was quickly reverted in pluggy 0.11.0.
See https://github.com/pytest-dev/pluggy/issues/205
2019-05-08 16:06:41 +01:00
Bruno Oliveira
2051e30b9b
Show fixture scopes with `--fixtures`, except for "function" scope ( #5221 )
...
Show fixture scopes with ``--fixtures``, except for "function" scope
2019-05-07 19:50:53 -03:00
Bruno Oliveira
f339147d12
Add CHANGELOG entry about depending on wcwidth
2019-05-07 19:34:57 -03:00
Bruno Oliveira
c04767f946
Use msg.rstrip() as suggested in review
2019-05-07 15:20:00 -03:00
Bruno Oliveira
6d040370ed
Show fixture scopes with `--fixtures`, except for "function" scope
...
Fix #5220
2019-05-07 14:32:20 -03:00
Bruno Oliveira
1d466d0aa7
Use exec directly ( #5224 )
...
Use exec directly
2019-05-07 10:02:12 -03:00
Bruno Oliveira
ef4dec0bcf
Skip test_source_mtime_long_long on 32bit and lower platforms ( #5045 )
...
Skip test_source_mtime_long_long on 32bit and lower platforms
2019-05-07 09:42:18 -03:00
Bruno Oliveira
d76735f9e5
Restore usedevelop=True now that pip 19.1.1 restored the old behavior ( #5222 )
...
Restore usedevelop=True now that pip 19.1.1 restored the old behavior
2019-05-07 08:46:47 -03:00
Anthony Sottile
d1a48ad68f
Use exec directly
2019-05-06 23:07:39 -07:00
Bruno Oliveira
6d259c400e
Merge pull request #5223 from 5uper5hoot/patch-1
...
Clarify docs for pytest.raises `match`.
2019-05-06 21:57:47 -03:00
Bruno Oliveira
d3686361ba
Fix linting
2019-05-07 00:52:40 +00:00
Peter Schutt
8605ed2a15
Update python_api.py
2019-05-07 10:10:25 +10:00
Peter Schutt
8b34d981fc
Clarify docs for pytest.raises match.
...
For #5208 .
Document explicit behavior of `match` and brief note on how to handle matching a string that may contain special re chars.
2019-05-07 09:56:13 +10:00
Bruno Oliveira
2795689435
Restore usedevelop=True now that pip 19.1.1 restored the old behavior
...
Fix #5167
2019-05-06 19:42:06 -03:00
Bruno Oliveira
dcf65a9643
Add links to pytest.raises message workaround ( #5218 )
...
Add links to pytest.raises `message` workaround
2019-05-06 18:56:40 -03:00
Bruno Oliveira
784e1e3b7e
Add links to pytest.raises message workaround
...
Related to #3974
2019-05-06 12:35:27 -03:00
Bruno Oliveira
4a2fdce62b
Emit a warning for record_property when used with xunit2 ( #5204 )
...
Emit a warning for record_property when used with xunit2
2019-05-05 21:33:31 -03:00
Bruno Oliveira
32a5e80a6d
Add encoding: header and fix rep mock in test_line_with_reprcrash on py27
2019-05-05 09:33:37 -03:00
Bruno Oliveira
0e8a8f94f6
Add encoding header to test_terminal.py
2019-05-05 09:14:07 -03:00
Bruno Oliveira
8f23e19bcb
Emit a warning for record_property when used with xunit2
...
"property" elements cannot be children of "testsuite" according to the schema, so it is incompatible with xunit2
Related to #5202
2019-05-05 09:01:13 -03:00
Daniel Hahler
f5c1f3df71
Merge pull request #5210 from nicoddemus/merge-master-into-features
...
Merge master into features
2019-05-05 08:02:06 +02:00
Daniel Hahler
b25802eca7
Merge pull request #5212 from jdufresne/new-black
...
Update Black URLs
2019-05-05 07:58:27 +02:00
Daniel Hahler
7f7f84757d
Merge pull request #5211 from hugovk/upgrade-pypy
...
Upgrade PyPy to 7.1.1
2019-05-05 04:50:11 +02:00
Jon Dufresne
143499d041
Update Black URLs
...
> Black, your uncompromising #Python code formatter, was a project
> created with the community in mind from Day 1. Today we moved it under
> the PSF umbrella. It's now available on GitHub under
> https://github.com/python/black/ . You install and use it just like
> before.
https://twitter.com/llanga/status/1123980466292445190
2019-05-04 08:28:50 -07:00
Hugo
26b41a5914
Upgrade PyPy to 7.1.1
2019-05-04 17:54:57 +03:00
Bruno Oliveira
9f66102869
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-05-04 10:47:57 -03:00
Bruno Oliveira
e1a426c067
Unify pypy ( #5209 )
...
Unify pypy
2019-05-04 10:46:14 -03:00
Bruno Oliveira
2bd97ebaf7
Use 'pypy' as executable on PyPy env [skip travis]
2019-05-04 10:27:06 -03:00
Bruno Oliveira
45eeb53c98
Fix a typo ( #5207 )
...
Fix a typo
2019-05-04 10:04:50 -03:00
Don Kirkby
254b195f50
Fix a typo
2019-05-03 22:30:20 -07:00
Daniel Hahler
865e84d206
Merge pull request #5109 from blueyed/summary_passes-green
...
summary_passes: use bold green for report headers
2019-05-04 00:46:23 +02:00
Bruno Oliveira
1c13418a8b
doc: fix hooks 'path' parameter doc type ( #5198 )
...
doc: fix hooks 'path' parameter doc type
2019-05-02 21:05:07 -03:00
DamianSkrzypczak
299e6479c1
add DamianSkrzypczak to AUTHORS
2019-05-02 23:45:34 +02:00
DamianSkrzypczak
6e81c3df92
add changelog for issue #5171 fixes
2019-05-02 21:30:03 +02:00
DamianSkrzypczak
1bd7d287a7
doc: fix hooks 'path' parameter doc type
...
by changing it from str to py.path.local
(#5171 )
2019-05-02 20:51:11 +02:00
Anthony Sottile
b82e1b87cc
Merge pull request #5195 from nicoddemus/pytest-config-docs
...
Add quick note about accessing config through session or item objects
2019-05-02 09:52:42 -07:00
Bruno Oliveira
af40473c9a
Add quick note about accessing config through session or item objects
...
Fix #5030
2019-05-01 11:46:35 -03:00
Bruno Oliveira
f17b734989
Improve help for --runxfail flag ( #5188 )
...
Improve help for --runxfail flag
2019-05-01 11:00:31 -03: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
3f5622c577
Use config_invocation_dir for startdirs ( #5151 )
...
Use config_invocation_dir for startdirs
2019-04-29 18:14:51 -03:00
Bruno Oliveira
1fb3f63f35
debugging: rename internal wrapper for pdb.Pdb ( #5186 )
...
debugging: rename internal wrapper for pdb.Pdb
2019-04-29 18:03:32 -03:00
Bruno Oliveira
fc2ad1dbed
Warning subclasses ( #5179 )
...
Warning subclasses
2019-04-29 17:57:49 -03:00
Matt Cooper
bc6450773a
remove PyPy special casing
2019-04-29 08:39:48 -04:00
Bruno Oliveira
204004c8b8
Review doctest docs ( #5183 )
...
Review doctest docs
2019-04-29 08:02:59 -03:00
Bruno Oliveira
772a4a5cf3
Remove all version references to obsolete pytest versions ( #5184 )
...
Remove all version references to obsolete pytest versions
2019-04-29 08:02:32 -03:00
Bruno Oliveira
fb6dad60a0
terminal: use pytest_collection_finish for reporting ( #5113 )
...
terminal: use pytest_collection_finish for reporting
2019-04-29 08:00:48 -03:00
Bruno Oliveira
d9cad1e759
Merge pull request #5176 from nicoddemus/initial-conftests-note
...
Add note about pytest_load_initial_conftests working only from plugins
2019-04-29 07:59:27 -03:00
Daniel Hahler
02053bf556
debugging: rename internal wrapper for pdb.Pdb
...
This is useful/clearer in case of errors / tracebacks - i.e. you see
clearly that it is coming from pytest.
2019-04-29 05:46:21 +02:00
Anthony Sottile
6fb3baf071
Merge pull request #5182 from nicoddemus/removed-unused-deprecation-msgs
...
Removed unused warning message
2019-04-28 20:26:11 -07:00
Daniel Hahler
ff5317a7f3
terminal: use pytest_collection_finish for reporting
2019-04-29 05:20:04 +02:00
Bruno Oliveira
766fc23151
Merge pull request #5185 from nicoddemus/lf-skip-files
...
--lf now skips colletion of files without failed tests
2019-04-28 21:48:53 -03:00
Bruno Oliveira
08734bdd18
--lf now skips colletion of files without failed tests
...
Fix #5172
2019-04-28 20:23:46 -03:00
Bruno Oliveira
e943aff995
Update blurb about Sybil
2019-04-28 20:01:22 -03:00
Bruno Oliveira
9c5da9c0d1
Remove all version references to obsolete pytest versions
...
Remove version references to pytest 2 and 3.
Just like Python 3 no longer has references to Python 2, I think
we should follow the same approach in pytest.
2019-04-28 12:37:58 -03:00
Bruno Oliveira
f6ab6d71ad
Run regendoc
2019-04-28 12:17:15 -03:00
Bruno Oliveira
67755d67fb
Review doctest docs
...
* Add pytest.skip() example
* Add blurb about Sybil
* Create a subsection for doctest-options
* Create a subsection for pytest-specific features
2019-04-28 12:17:15 -03:00
Bruno Oliveira
a3c2ec3c5b
Add CHANGELOG for #5182
2019-04-28 11:10:21 -03:00
Bruno Oliveira
9742f11d37
Removed unused warning message
2019-04-28 11:06:47 -03:00
Bruno Oliveira
915ecb0dac
Add CHANGELOG for #5177
2019-04-28 10:47:19 -03:00
Bruno Oliveira
53cd7fd2ea
Introduce new warning subclasses
...
Fix #5177
2019-04-28 10:38:25 -03:00
Bruno Oliveira
8532e991a5
Publish UnknownMarkWarning as part of the public API and docs
2019-04-28 10:16:07 -03:00
Bruno Oliveira
50937fe622
Add note about pytest_load_initial_conftests working only from plugins
...
Fix #5175
2019-04-27 10:12:27 -03:00
Daniel Hahler
ebc0cea226
Merge pull request #5174 from blueyed/no-terminal
...
Terminal plugin is not semi-essential anymore
2019-04-27 09:51:32 +02:00
Daniel Hahler
65133018f3
Terminal plugin is not semi-essential anymore
...
Thanks to https://github.com/pytest-dev/pytest/pull/5138 .
2019-04-27 03:39:00 +02:00
Anthony Sottile
ac7ee40aaf
Merge pull request #5173 from blueyed/revert
...
Revert "Merge pull request #4854 from blueyed/pdb-skip"
2019-04-26 17:48:04 -07:00
Daniel Hahler
308b733b9d
Revert "Merge pull request #4854 from blueyed/pdb-skip"
...
This reverts commit e88aa957ae , reversing
changes made to 1410d3dc9a .
I do not think it warrants an option anymore, and there is a way to
achieve this via `--pdbcls` if needed.
2019-04-27 02:25:38 +02:00
Daniel Hahler
76c6ed8b05
Merge pull request #5162 from blueyed/mm
...
Merge master into features
2019-04-27 01:42:42 +02:00
Daniel Hahler
7f519f8ab7
Merge master into features
2019-04-27 00:43:00 +02:00
Bruno Oliveira
9c700d1fd5
Workaround for editable installs with pip 19.1 ( #5168 )
...
Workaround for editable installs with pip 19.1
2019-04-26 18:29:28 -03:00
Bruno Oliveira
19cd4d0af7
Workaround for editable installs with pip 19.1
...
Related to #5167
2019-04-25 19:40:01 -03:00
Bruno Oliveira
bf0fe1a1fa
GitHub: revisit issue/PR templates [ci skip] ( #5158 )
...
GitHub: revisit issue/PR templates [ci skip]
2019-04-24 12:09:55 -03:00
Daniel Hahler
3df32e2732
GitHub: revisit issue/PR templates [ci skip]
...
The motivation here is to not have the same boilerplate with PRs.
2019-04-23 18:01:13 +02:00
Daniel Hahler
0bf363472e
Use config_invocation_dir for startdirs
...
`Session.startdir` and `TerminalReporter.startdir` appear to be
redundant given `Config.invocation_dir`.
Keep them for backward compatibility reasons, but use
`config.invocation_dir` for them.
2019-04-22 02:05:59 +02:00
Daniel Hahler
34bc594beb
Merge pull request #5133 from kondratyev-nv/fix-handle-repr-error-with-showlocals
...
Fix handle repr error with showlocals and verbose output
2019-04-19 19:23:39 +02:00
Nikolay Kondratyev
bc00d0f7db
Fix handle repr error with showlocals and verbose output
2019-04-19 18:54:21 +03:00
Daniel Hahler
e3e57a755b
Merge pull request #5083 from blueyed/capture-_suspended
...
capture: store _state
2019-04-19 17:32:54 +02:00
Daniel Hahler
79d5fc3a0b
Merge pull request #5144 from blueyed/sessionfinish-exitstatus
...
pytest_sessionfinish: preset exitstatus with UsageErrors
2019-04-19 17:30:01 +02:00
Bruno Oliveira
322d686ab4
Merge pull request #5145 from blueyed/prefer-fast-wrapper
...
conftest: use a hookwrapper with sorting faster tests first
2019-04-19 12:25:55 -03:00
Daniel Hahler
f75f7c1925
conftest: use a hookwrapper with sorting faster tests first
2019-04-19 01:23:34 +02:00
Daniel Hahler
698c4e75fd
capture: track current state in _state attributes
...
This is meant for debugging, and making assertions later.
2019-04-19 00:35:15 +02:00
Daniel Hahler
4749dca764
changelog [ci skip]
2019-04-18 23:54:20 +02:00
Daniel Hahler
649d23c8a8
pytest_sessionfinish: preset exitstatus with UsageErrors
...
Previously it would be 0. Setting it to the expected outcome
(EXIT_USAGEERROR) here already helps `pytest_sessionfinish` hooks.
2019-04-18 23:18:59 +02:00
Daniel Hahler
e87d3d70e2
Merge pull request #5138 from ikonst/notify_exception_without_terminal
...
Fix dependencies on 'terminal' plugin
2019-04-17 23:20:49 +02:00
Daniel Hahler
1460ad6027
Merge pull request #5111 from blueyed/deselect_by_keyword-skip
...
deselect_by_keyword: skip without expression
2019-04-17 23:20:02 +02:00
Daniel Hahler
78cd1a07d0
Merge pull request #5140 from blueyed/rewrite-name
...
assertion rewriting: use actual helper name
2019-04-17 23:19:38 +02:00
Ilya Konstantinov
d67d68f6d3
Eliminate core dependency on 'terminal' plugin
2019-04-17 11:19:19 -07:00
Bruno Oliveira
008d04398a
Merge pull request #5135 from dougthor42/patch-1
...
[Docs] Fix typo in skipping.rst
2019-04-17 14:36:57 -03:00
Daniel Hahler
c3178a176d
move test
2019-04-17 15:30:34 +02:00
Daniel Hahler
df1d1105b0
Merge remote-tracking branch 'origin/features' into short-summary-message
...
Conflicts:
src/_pytest/skipping.py
2019-04-17 15:30:19 +02:00
Daniel Hahler
2b11b2c093
Merge pull request #5126 from blueyed/report-get_verbose_word
...
terminal/reports: use get_verbose_word method
2019-04-17 14:43:54 +02:00
Daniel Hahler
adb8edbae1
assertion rewriting: use actual helper name
...
This makes it easier / possible to grep.
2019-04-17 14:41:34 +02:00
Douglas Thor
0e651d7297
[Docs] Fix typo in skipping.rst
...
One of the `pytest.mark.skipif` blocks does not use the `reason` kwarg.
2019-04-16 09:30:13 -07:00
Anthony Sottile
3cff5e252d
Merge pull request #5117 from blueyed/cov-terminal
...
Minor coverage improvements for terminal plugin
2019-04-15 14:30:18 -07:00
Daniel Hahler
7412df0920
fixup! terminal: summary_errors: replace if with assert
2019-04-15 22:53:31 +02:00
Anthony Sottile
990133f804
Merge pull request #5132 from nicoddemus/merge-master-into-features
...
Merge master into features
2019-04-15 13:11:33 -07:00
Bruno Oliveira
df68808d29
Merge pull request #5116 from blueyed/cov-pytester
...
Minor coverage improvements for pytester
2019-04-15 14:49:28 -03:00
Bruno Oliveira
b64d9402ca
Merge pull request #5108 from blueyed/summary
...
terminal summary: display passes after warnings
2019-04-15 14:49:01 -03:00
Bruno Oliveira
8d3a5dcd1b
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-04-15 14:47:45 -03:00
Bruno Oliveira
9eac4733c5
Merge pull request #5129 from nicoddemus/release-4.4.1
...
Release version 4.4.1
2019-04-15 14:41:36 -03:00
Bruno Oliveira
24bd51bda0
Merge pull request #5131 from blueyed/_getfailureheadline
...
_getfailureheadline: get head_line property only once
2019-04-15 12:23:41 -03:00
Daniel Hahler
9374114370
terminal/reports: add/use _get_verbose_word method
2019-04-15 17:06:18 +02:00
Daniel Hahler
eb13530560
_getfailureheadline: get head_line property only once
2019-04-15 17:04:51 +02:00
Daniel Hahler
5530d3e15d
Merge pull request #5120 from blueyed/minor
...
A collection of minor code tweaks
2019-04-15 16:32:20 +02:00
Daniel Hahler
ea79eb5c3f
terminal summary: display passes after warnings
...
This displays passes (with output, `-rP`) before the short summary, and
before any other output from other plugins also.
2019-04-15 16:31:42 +02:00
Bruno Oliveira
c8b904a406
Merge pull request #5124 from blueyed/terminal-summary_failures
...
terminal: revisit summary_failures
2019-04-15 11:26:52 -03:00
Bruno Oliveira
d45fa7b212
Merge pull request #5123 from blueyed/clsname
...
TestReport: use class name in repr
2019-04-15 11:25:42 -03:00
Bruno Oliveira
852ca7ad59
Merge pull request #5114 from blueyed/fixtest
...
test_pytest_exit_returncode: ignore ResourceWarnings
2019-04-15 11:25:16 -03:00
Bruno Oliveira
006dc30476
Preparing release version 4.4.1
2019-04-15 14:24:17 +00:00
Daniel Hahler
45ba736c81
Merge pull request #5128 from blueyed/mark-is
...
Fix error message with unregistered markers
2019-04-15 16:23:54 +02:00
Bruno Oliveira
c453fe7053
Merge pull request #5118 from blueyed/mm
...
Merge master into features
2019-04-15 11:21:59 -03:00
Daniel Hahler
cc005af47e
Fix error message with unregistered markers
2019-04-15 10:15:37 +02:00
Daniel Hahler
20c624efcf
terminal: revisit summary_failures
...
- get the list of reports for teardown sections only once
- do not check option in loop
2019-04-15 06:47:51 +02:00
Daniel Hahler
b2be6c1a30
TestReport: use class name in repr
2019-04-15 05:47:45 +02:00
Daniel Hahler
c43a9c83ee
doc: pytest_deselected: not only via keywords
2019-04-14 23:53:06 +02:00
Daniel Hahler
e804e419bc
remove unnecessary newline
2019-04-14 23:53:06 +02:00
Daniel Hahler
992e7f7771
rename variable
2019-04-14 23:53:06 +02:00
Daniel Hahler
bd1a2e6435
fix typo
2019-04-14 23:53:06 +02:00
Daniel Hahler
1d137fd2fe
minor: LFPlugin: de-indent code by returning if not active
2019-04-14 23:53:06 +02:00
Daniel Hahler
f1f1862b19
Update testing/test_runner.py
2019-04-14 23:26:56 +02:00
Daniel Hahler
6f0a5789fb
Merge master into features
2019-04-14 23:22:21 +02:00
Daniel Hahler
cc78a533ae
terminal: summary_errors: replace if with assert
2019-04-14 23:17:27 +02:00
Daniel Hahler
fd0b3e2e8b
getreportopt: remove needless if
2019-04-14 23:17:27 +02:00
Daniel Hahler
f3dbe5a308
pytester: listoutcomes: assert instead of implicit if
2019-04-14 23:00:38 +02:00
Daniel Hahler
1da8ce65a6
pytester: raise_on_kwargs: ignore branch coverage
2019-04-14 23:00:38 +02:00
Daniel Hahler
1dd5f088fa
test_pytest_exit_returncode: ignore ResourceWarnings
...
Fixes https://github.com/pytest-dev/pytest/issues/5088 .
2019-04-14 21:55:15 +02:00
Daniel Hahler
6a73714b00
deselect_by_keyword: skip without expression
...
There is no need to iterate over all items always, if `-k` is not
specified.
2019-04-14 19:01:33 +02:00
Daniel Hahler
6371243c10
summary_passes: use bold green for report headers
2019-04-14 15:21:11 +02:00
Daniel Hahler
533e610a35
Merge pull request #5098 from blueyed/fix-syspath_prepend
...
monkeypatch.syspath_prepend: invalidate import cache
2019-04-13 18:46:16 +02: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
c3b7efc818
Merge pull request #5097 from asottile/unknown_kwargs_param
...
Produce a warning when unknown arguments are passed to pytest.param()
2019-04-12 13:30:07 -07:00
Anthony Sottile
43e7401c91
Produce a warning when unknown arguments are passed to pytest.param()
2019-04-12 13:00:39 -07:00
Bruno Oliveira
a9e850f749
Merge pull request #5096 from asottile/docs_highlight
...
blacken-docs more code samples in docs
2019-04-12 10:00:26 -03:00
Anthony Sottile
da2e092163
pre-commit autoupdate
2019-04-12 04:52:47 -07:00
Anthony Sottile
8449294e5d
blacken-docs more code samples in docs
2019-04-12 04:50:26 -07:00
Bruno Oliveira
19035f4b55
Merge pull request #5068 from blueyed/reportchars
...
Add support for reportchars=A (`-rA`)
2019-04-12 08:13:22 -03:00
Bruno Oliveira
48ed437e70
Merge pull request #5087 from samueljsb/issue/4907
...
Show XFail reason as part of JUnitXML message field
2019-04-11 19:20:21 -03:00
Bruno Oliveira
14d3d9187f
Remove partial unicode characters from summary messages in Python 2
2019-04-11 19:01:21 -03:00
Samuel Searles-Bryant
a37d1df089
Show XFail reason as part of JUnitXML message field
...
Fixes #4907
2019-04-11 22:26:05 +01:00
Daniel Hahler
97cd5f0deb
Merge pull request #5094 from blueyed/merge-master
...
Merge master into festures
2019-04-11 23:05:29 +02:00
Bruno Oliveira
1dafe969d1
Merge pull request #5093 from blueyed/tbreportdemo
...
docs: tbreportdemo: remove obsolete comment
2019-04-11 13:07:02 -03:00
Daniel Hahler
8b2fcf517c
Merge master
2019-04-11 13:28:36 +02:00
Daniel Hahler
42e60d935a
doc/changelog
2019-04-11 11:44:04 +02:00
Daniel Hahler
1f66e3b0d0
docs: tbreportdemo: remove obsolete comment
2019-04-11 11:39:23 +02:00
Daniel Hahler
b3759372ad
Merge pull request #5082 from blueyed/pytester-raise_on_kwargs
...
pytester: improve/fix kwargs validation
2019-04-11 00:46:18 +02:00
Bruno Oliveira
f5d2b199e2
Merge pull request #5069 from blueyed/cleanup-summary-to-terminal
...
cleanup: move terminal summary code to terminal plugin
2019-04-10 19:32:01 -03:00
Bruno Oliveira
bc157417e1
Merge pull request #5051 from blueyed/fix-test
...
Fix test_conftest when run via pytest-randomly
2019-04-10 19:08:28 -03:00
Daniel Hahler
12133d4eb7
changelog [ci skip]
2019-04-10 23:15:25 +02:00
Daniel Hahler
148f2fc72c
Fix test_error_during_readouterr: syspathinsert is unused
2019-04-10 21:57:45 +02:00
Daniel Hahler
5d9d12a6be
pytester: improve/fix kwargs validation
2019-04-10 21:57:45 +02:00
Daniel Hahler
dde27a2305
changelog [ci skip]
2019-04-10 21:39:51 +02:00
Daniel Hahler
10fa66e5b5
Merge pull request #5059 from blueyed/pytester-popen-run-stdin
...
pytester: allow passing in stdin to run/popen
2019-04-10 20:32:22 +02:00
Bruno Oliveira
5e26304d81
Merge pull request #5075 from blueyed/console_output_style
...
terminal: console_output_style: document "count" with help
2019-04-09 20:54:12 -03:00
Bruno Oliveira
d0860a339b
Merge pull request #5076 from blueyed/_show_progress_info
...
terminal: store console_output_style in _show_progress_info
2019-04-09 20:37:50 -03:00
Daniel Hahler
fcbfdef11b
Merge pull request #5071 from blueyed/prefer-fast
...
Add a conftest to prefer faster tests
2019-04-10 01:22:24 +02:00
Daniel Hahler
b84f826fc8
test_run_stdin: add sleep
2019-04-10 00:03:49 +02:00
Daniel Hahler
ec46864922
run: pass through stdin, just close then
2019-04-10 00:02:38 +02:00
Daniel Hahler
c36a90531a
Move CLOSE_STDIN to class
2019-04-10 00:01:15 +02:00
Daniel Hahler
3fa329c9e9
Merge pull request #5074 from blueyed/trace
...
pdb: add test for --trace with --pdbcls
2019-04-08 18:48:44 +02:00
Daniel Hahler
a70e5f119e
terminal: store console_output_style in _show_progress_info
...
Avoids ini lookups.
2019-04-08 04:34:26 +02:00
Daniel Hahler
b6b7185b7b
terminal: console_output_style: document "count" with help
2019-04-08 04:32:53 +02:00
Daniel Hahler
4fb7a91a5e
pdb: add test for --trace with --pdbcls
...
Ensures that https://github.com/pytest-dev/pytest/issues/4111 is fixed,
which happened in 92a2884b as a byproduct.
2019-04-08 03:49:03 +02:00
Daniel Hahler
ff5e98c654
Change noqa comment to pragma
2019-04-08 03:48:42 +02:00
Daniel Hahler
2662c400ba
dedent
2019-04-07 20:04:31 +02:00
Daniel Hahler
d8d835c1f5
minor: use functools.partial
2019-04-07 19:49:18 +02:00
Daniel Hahler
06029d11d3
Refactor into TerminalReporter.short_test_summary
2019-04-07 19:49:18 +02:00
Daniel Hahler
4c0ba6017d
Add a conftest to prefer faster tests
...
This uses pytest_collection_modifyitems for pytest's own tests to order
them, preferring faster ones via quick'n'dirty heuristics only for now.
2019-04-07 19:11:17 +02:00
Daniel Hahler
c70ecd49ca
cleanup: move terminal summary code to terminal plugin
...
Fixes https://github.com/pytest-dev/pytest/issues/5067 .
2019-04-07 18:22:04 +02:00
Daniel Hahler
50edab8004
Add tests for reportchars=a
...
Ref: https://github.com/pytest-dev/pytest/issues/5066
2019-04-07 18:05:33 +02:00
Daniel Hahler
b4b9f788af
Support reportchars=A (really all, including passed)
2019-04-07 18:05:33 +02:00
Daniel Hahler
a7e49e6c07
reportchars: fix/improve help message
2019-04-07 18:05:33 +02:00
Daniel Hahler
2b1ae8a66d
__tracebackhide__ for check
2019-04-06 15:00:23 +02:00
Daniel Hahler
2ebb69b50a
py2 fixes
2019-04-06 15:00:12 +02:00
Daniel Hahler
4fca86e2af
testdir.popen: use kwargs with defaults for stdout/stderr
2019-04-06 12:13:48 +02:00
Daniel Hahler
9ad00714ba
pytester: allow passing in stdin to run/popen
2019-04-06 12:13:28 +02:00
Bruno Oliveira
b549438423
Merge pull request #5058 from blueyed/merge-master-into-features
...
Merge master into features
2019-04-05 14:28:48 -03:00
Daniel Hahler
377888140f
Merge master into features
...
Conflicts:
testing/test_pdb.py
2019-04-05 17:50:32 +02:00
Daniel Hahler
df377b589f
use wcwidth
2019-04-05 17:43:11 +02:00
Bruno Oliveira
87ce586d29
Merge pull request #5055 from blueyed/showhelp-lazy-fullwidth
...
showhelp: move tw.fullwidth out of the loop
2019-04-05 12:11:47 -03:00
Daniel Hahler
f599172add
test with 😄 in message
2019-04-05 16:08:11 +02:00
Daniel Hahler
e20b39d928
showhelp: move tw.fullwidth out of the loop
2019-04-05 15:14:02 +02:00
Bruno Oliveira
4f33f46a02
Merge pull request #5026 from blueyed/compare-len-diff
...
Display number of different items with sequence/dict comparisons
2019-04-05 08:53:48 -03:00
Daniel Hahler
159704421e
change separator to hyphen
2019-04-05 12:21:24 +02:00
Daniel Hahler
0f965e57a2
changelog, fix branch coverage
2019-04-05 12:12:29 +02:00
Daniel Hahler
8011ff5bda
Add _sys_snapshot fixture and use it with more tests
2019-04-05 11:55:23 +02:00
Daniel Hahler
899e74aa14
tests: harden test_immediate_initialiation_and_incremental_are_the_same
2019-04-05 11:55:23 +02:00
Daniel Hahler
66f743c45a
Fix test_conftest when run via pytest-randomly
2019-04-05 11:55:23 +02:00
Daniel Hahler
8ad99c5cab
Merge pull request #5035 from blueyed/cache-glob
...
Support glob argument with ``--cache-show``
2019-04-05 10:25:19 +02:00
Jeffrey Rackauckas
da3f836ee3
Added the junit_log_passing_tests ini flag.
2019-04-04 20:26:48 -07:00
Daniel Hahler
37ecca3ba9
factor out _get_line_with_reprcrash_message
2019-04-04 22:13:28 +02:00
Daniel Hahler
3d0ecd03ed
Display message from reprcrash in short test summary
...
This is useful to see common patterns easily, but also for single
failures already.
2019-04-04 18:49:13 +02:00
Daniel Hahler
eb5b2e0db5
Support glob argument with `--cache-show`
2019-04-04 18:10:39 +02:00
Daniel Hahler
47d92a0d96
Add tests and improve messages
2019-04-04 17:53:39 +02:00
Daniel Hahler
7f1bf44aa8
_compare_eq_dict: display number of different items
2019-04-04 17:16:21 +02:00
Daniel Hahler
5fec793bc7
_compare_eq_sequence: display number of extra items
2019-04-04 17:16:21 +02:00
Bruno Oliveira
e04936fc29
Merge pull request #5042 from blueyed/merge-regen-master-into-features
...
Merge master into features (with regen)
2019-04-04 10:44:30 -03:00
Daniel Hahler
13a9d876f7
Merge pull request #5037 from blueyed/regen
...
docs: revisit/fix regen
2019-04-04 13:36:47 +02:00
Ondřej Súkup
77526f412c
Skip test_source_mtime_long_long on 32bit and lower platforms
2019-04-04 13:14:46 +02:00
Daniel Hahler
0d4636b056
Merge pull request #5034 from blueyed/run-last-failure-report
...
run-last-failure: improve reporting
2019-04-04 00:40:40 +02:00
Daniel Hahler
a65edf6711
Merge pull request #5028 from blueyed/fix-wrap_session-exit-code
...
wrap_session: restore old behavior for initstate=1
2019-04-04 00:39:38 +02:00
Bruno Oliveira
973301b675
Merge pull request #5041 from blueyed/fix-pdbcls-regression
...
pdb: try to import --pdbcls in pytest_configure only
2019-04-03 19:23:43 -03: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
e88aa957ae
Merge pull request #4854 from blueyed/pdb-skip
...
pdb: add option to skip `pdb.set_trace()`
2019-04-03 22:25:38 +02:00
Daniel Hahler
8907fedc79
Merge master into features (with regen branch)
2019-04-03 22:11:00 +02:00
Daniel Hahler
befc8a3f10
Update via https://github.com/pytest-dev/regendoc/pull/8
2019-04-03 22:08:44 +02:00
Daniel Hahler
5935fbaa7a
doc/en/Makefile: stabilize output between regendoc versions
2019-04-03 22:07:33 +02:00
Daniel Hahler
e8eaebe595
tox.ini: regen: clear pytest cache for stable outcome
2019-04-03 19:53:00 +02:00
Daniel Hahler
cec2dd6a7c
doc/en/Makefile: allow passing in REGENDOC_FILES
...
This allows for:
> make -C doc/en regen REGENDOC_FILES=example/parametrize.rst
2019-04-03 19:53:00 +02:00
Daniel Hahler
266bf2c007
doc: make regen: replace trailing spaces already
2019-04-03 17:34:26 +02:00
Daniel Hahler
1f5a61e4ef
run-last-failure: improve reporting
2019-04-03 16:27:12 +02:00
Bruno Oliveira
46df1d5fcf
Merge pull request #5031 from blueyed/pytester-addopts
...
pytester: use monkeypatch with Testdir
2019-04-03 11:26:49 -03:00
Daniel Hahler
d91527599a
pytester: use monkeypatch with Testdir
2019-04-03 15:02:53 +02:00
Bruno Oliveira
1410d3dc9a
Merge pull request #5029 from blueyed/minor
...
Minor: doc, import
2019-04-03 08:58:12 -03:00
Daniel Hahler
7538aa7bb9
minor: check_interactive_exception: use Skipped
2019-04-03 11:45:45 +02:00
Daniel Hahler
db34bf01b6
doc: minor whitespace, punctuation
2019-04-03 11:45:45 +02:00
Daniel Hahler
9434541090
doc: mention that pytest.fixture's param is in request.param
2019-04-03 11:45:45 +02:00
Daniel Hahler
cc90bcce4c
wrap_session: restore old behavior for initstate=1
2019-04-03 05:09:21 +02:00
Bruno Oliveira
15ea5cef46
Merge pull request #4943 from blueyed/remove-silence_logging_at_shutdown
...
capture: do not set logging.raiseExceptions = False
2019-04-02 22:46:15 -03:00
Daniel Hahler
32a8d503a2
Merge pull request #5005 from blueyed/essential_plugins
...
Split out list of essential plugins
2019-04-03 02:45:19 +02:00
Daniel Hahler
8c734dfc2f
Split out list of essential plugins
...
Fixes https://github.com/pytest-dev/pytest/issues/4976 .
2019-04-02 14:39:56 +02:00
Daniel Hahler
08ded2927a
capture: do not set logging.raiseExceptions = False
...
Ref: https://github.com/pytest-dev/pytest/issues/4942
2019-04-02 13:20:39 +02:00
Zac Hatfield-Dodds
1c9dcf1f39
Merge pull request #4935 from Zac-HD/warn-unknown-marks
...
Emit warning on unknown marks via decorator
2019-04-02 21:29:09 +11:00
Zac Hatfield-Dodds
cab4069f42
Clarify mark.__getattr__
2019-04-02 12:31:42 +11:00
Zac Hatfield-Dodds
4f6c67658c
Use mark-specific warning type
...
So that we can ignore it in self-tests.
2019-04-01 12:38:33 +11:00
Zac Hatfield-Dodds
cda9ce198a
Register marks from self-tests
2019-04-01 10:52:43 +11:00
Zac Hatfield-Dodds
9121138a1b
Emit warning for unknown marks
2019-04-01 10:40:18 +11:00
Zac Hatfield-Dodds
407d74be27
Merge pull request #5015 from Zac-HD/mark-warning-prep
...
Pre-PR for warnings on unknown markers
2019-04-01 10:07:43 +11:00
Bruno Oliveira
49d690d137
Merge pull request #5014 from nicoddemus/release-4.4.0
...
Release 4.4.0
2019-03-31 18:14:27 -03:00
Daniel Hahler
deade370b9
Update doc/en/mark.rst
...
Co-Authored-By: Zac-HD <Zac-HD@users.noreply.github.com >
2019-04-01 07:13:45 +11:00
Zac-HD
00810b9b2a
Register "issue" mark for self-tests
2019-03-31 14:22:30 +11:00
Zac-HD
bcc08ffe4d
More docs on registering marks
2019-03-31 14:22:30 +11:00
Zac-HD
ba1fc02a9b
Register mark used by pytester
2019-03-31 14:22:30 +11:00
Zac-HD
38d687f7c7
Fix typos in comments
2019-03-31 14:22:30 +11:00
Daniel Hahler
4621638f07
Update CHANGELOG.rst
...
Co-Authored-By: nicoddemus <nicoddemus@gmail.com >
2019-03-29 20:29:40 -03: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
dee520e310
Merge pull request #5008 from blueyed/setup-cfg-tool-pytest
...
setup.cfg: use existing [tool:pytest] (ignoring [pytest])
2019-03-29 16:47:31 +01:00
Daniel Hahler
adebfd0a84
pdb: add option to skip pdb.set_trace()
2019-03-29 11:13:38 +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
2812c087ec
Merge pull request #5010 from garytyler/docupdate
...
Update docs for 'pytest_cmdline_parse' hook to note availability limi…
2019-03-28 22:32:50 -03: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
63a01bdb33
Factor out pytestPDB._is_capturing
2019-03-28 11:49:01 +01:00
Daniel Hahler
d53209956b
test_pdb_continue_with_recursive_debug: mock pdb.set_trace
2019-03-28 11:49:01 +01:00
Daniel Hahler
951213ee09
Use new suspend/resume in global_and_fixture_disabled
2019-03-28 11:49:01 +01:00
Daniel Hahler
ae067df941
add test_pdb_continue_with_recursive_debug
2019-03-28 11:49:01 +01:00
Daniel Hahler
40718efacc
Fix/revisit do_continue with regard to conditions
2019-03-28 11:49:01 +01:00
Daniel Hahler
d406786a8d
pdb: handle capturing with fixtures only
2019-03-28 11:49:01 +01:00
Daniel Hahler
0ac069da13
Merge pull request #5006 from blueyed/capture-clean
...
tests: ensure cleanup with configs via get_config()
2019-03-28 11:38:30 +01:00
Daniel Hahler
d17ea7a9c0
tests: ensure cleanup with configs via get_config()
...
Also done in test_pluginmanager, although no resource warnings are
there at least.
Fixes https://github.com/pytest-dev/pytest/issues/4355 .
2019-03-28 00:14:13 +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
50a5cebba8
Merge pull request #5002 from blueyed/report
...
skipping: factor out _get_pos, pass only config to _get_report_str
2019-03-27 23:07:11 +01:00
Bruno Oliveira
6c602c2282
Merge pull request #4995 from youknowone/disble_test_id_escaping
...
add ini option to disable string escape for parametrization
2019-03-27 17:34:35 -03:00
Daniel Hahler
76c70cbf4c
Fix off-by-one error with lineno in mark collection error
2019-03-27 17:44:52 +01:00
Bruno Oliveira
3d9e68ecfd
Update doc/en/parametrize.rst
2019-03-28 00:07:28 +09: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
69a55d334a
Merge pull request #5004 from blueyed/doc-pdb
...
doc: fix note about output capturing with pdb
2019-03-26 20:20:05 -03: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
Bruno Oliveira
aae02863db
Merge pull request #4999 from nicoddemus/cmdline_parse-early
...
Docs: modules implementing pytest_cmdline_parse can be early-loaded
2019-03-26 18:14:31 -03:00
Daniel Hahler
49f36bb028
Merge pull request #4988 from blueyed/logging-close
...
logging: close log_file_handler
2019-03-26 19:57:57 +01:00
Daniel Hahler
52730f6330
doc: fix note about output capturing with pdb
...
[skip travis]
2019-03-26 18:33:00 +01: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
Bruno Oliveira
9311d822c7
Fix assertion in pytest_report_unserialize
2019-03-26 12:47:31 -03:00
Daniel Hahler
351529cb50
skipping: factor out _get_pos, pass only config to _get_report_str
2019-03-26 16:29:16 +01:00
Daniel Hahler
94a2e3dddc
stepwise: report status via pytest_report_collectionfinish
2019-03-26 13:20:33 +01:00
Bruno Oliveira
ee96214a8d
Merge pull request #5000 from blueyed/merge-master-into-features
...
Merge master into features
2019-03-26 09:01:46 -03: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
Daniel Hahler
4148663706
Merge pull request #4979 from blueyed/minor
...
Minor: whitespace, typo, docs
2019-03-26 10:01:13 +01:00
Bruno Oliveira
3e1971eb16
Merge pull request #4994 from blueyed/test_as_errors-subprocess
...
test_as_errors: use subprocess with `-W`
2019-03-25 20:50:15 -03:00
Bruno Oliveira
bcdb86ee7e
Merge pull request #4991 from blueyed/fix-tests
...
Fix pytest's own tests with `-W error::ResourceWarning`
2019-03-25 20:47:51 -03:00
Bruno Oliveira
2d77018d1b
Improve coverage for _report_unserialization_failure
2019-03-25 20:16:59 -03:00
Bruno Oliveira
ceef0af1ae
Improve coverage for to_json() with paths in reports
2019-03-25 20:16:59 -03:00
Bruno Oliveira
e4eec3416a
Note that tests from xdist reference the correct xdist issues
2019-03-25 20:16:59 -03:00
Bruno Oliveira
645774295f
Add CHANGELOG
2019-03-25 20:16:59 -03:00
Bruno Oliveira
f2e0c740d3
Code review suggestions
2019-03-25 20:16:59 -03:00
Bruno Oliveira
d856f4e51f
Make sure TestReports are not collected as test classes
2019-03-25 20:16:59 -03:00
Bruno Oliveira
7b9a414524
Add pytest_report_serialize and pytest_report_unserialize hooks
...
These hooks will be used by pytest-xdist and pytest-subtests to
serialize and customize reports.
2019-03-25 20:16:59 -03:00
Bruno Oliveira
0c63f99016
Add experimental _to_json and _from_json to TestReport and CollectReport
...
This methods were moved from xdist (ca03269).
Our intention is to keep this code closer to the core, given that it
might break easily due to refactorings.
Having it in the core might also allow to improve the code by moving
some responsibility to the "code" objects (ReprEntry, etc) which
are often found in the reports.
Finally pytest-xdist and pytest-subtests can use those functions
instead of coding it themselves.
2019-03-25 20:16:59 -03:00
Daniel Hahler
3bc9cbea63
Merge pull request #4989 from blueyed/test_collect_capturing
...
test_collect_capturing: cover captured stderr
2019-03-25 23:41:53 +01:00
Daniel Hahler
6eff3069da
Merge pull request #4851 from blueyed/addopts-vv
...
ci: PYTEST_ADDOPTS=-vv
2019-03-25 23:41:33 +01:00
Daniel Hahler
58a14b6b99
Merge pull request #4986 from blueyed/fnmatch_lines-list
...
tests: fnmatch_lines: use list
2019-03-25 23:31:04 +01:00
Daniel Hahler
b53bf44139
Merge pull request #4985 from blueyed/assert-from_current
...
ExceptionInfo.from_current: assert current exception
2019-03-25 23:28:58 +01:00
Daniel Hahler
d8758443bd
Merge pull request #4983 from blueyed/coveragerc
...
.coveragerc: use "src" only from current dir
2019-03-25 23:28:23 +01:00
Daniel Hahler
51f64c2920
Merge pull request #4980 from blueyed/fixup_namespace_packages
...
monkeypatch.syspath_prepend: call fixup_namespace_packages
2019-03-25 23:10:00 +01:00
Bruno Oliveira
cea42ff9e4
Docs: modules implementing pytest_cmdline_parse can be early-loaded
...
Related to #4974
2019-03-25 18:43:06 -03:00
Daniel Hahler
2df9d05981
Merge pull request #4982 from blueyed/cover
...
Revisit coverage in some tests
2019-03-25 10:28:55 +01:00
Daniel Hahler
4142c41ffc
Merge pull request #4990 from blueyed/session-repr
...
Session repr
2019-03-24 19:54:18 +01:00
Daniel Hahler
de44293d59
CollectError.repr_failure: honor explicit tbstyle option
2019-03-24 11:24:19 +01:00
Daniel Hahler
5efe6ab93c
test_log_cli_auto_enable: get stdout once
2019-03-24 11:22:07 +01:00
Daniel Hahler
ce59f42ce1
revisit test_root_logger_affected
2019-03-24 11:21:13 +01:00
Daniel Hahler
7da7b9610c
minor: whitespace
2019-03-24 11:20:24 +01:00
Daniel Hahler
d44e42ec15
doc: improve warning_record_to_str
2019-03-24 11:20:01 +01:00
Daniel Hahler
0ea1889265
test_as_errors: use subprocess with -W
...
Ref: https://github.com/pytest-dev/pytest/pull/4981
2019-03-24 11:17:55 +01:00
Daniel Hahler
6352cf2374
test_implicit_bad_repr1: harden/cleanup
2019-03-24 11:15:40 +01:00
Daniel Hahler
3127ec737b
Fix pytest's own tests with -W error::ResourceWarning
2019-03-24 11:05:00 +01:00
Daniel Hahler
aa0b657e58
Add Session.__repr__
2019-03-24 11:02:58 +01:00
Daniel Hahler
d0f3f26fff
test_collect_capturing: cover captured stderr
2019-03-23 23:17:07 +01:00
Daniel Hahler
08f3b02dfc
tests: fnmatch_lines: use list
...
For strings fnmatch_lines converts it into a Source objects, splitted on
newlines. This is not necessary here, and it is more consistent to use
lists here in the first place.
2019-03-23 11:36:18 +01:00
Daniel Hahler
2d690b83bf
ExceptionInfo.from_current: assert current exception
2019-03-23 00:29:36 +01:00
Daniel Hahler
0642da0145
.coveragerc: use "src" only from current dir
...
This avoids including generated test files with "src" in their path.
2019-03-22 17:48:14 +01:00
Daniel Hahler
afa985c135
Revisit coverage in some tests
2019-03-22 17:26:16 +01:00
Daniel Hahler
fd64fa1863
Revisit test_importplugin_error_message
...
Should be more helpful in case of errors than before:
> assert re.match(expected_message, str(excinfo.value))
E _pytest.warning_types.PytestWarning: asserting the value None, please use "assert is None"
https://travis-ci.org/pytest-dev/pytest/jobs/509970576#L208
2019-03-22 17:02:26 +01:00
Daniel Hahler
56dc01ffe0
minor: revisit _possibly_invalidate_import_caches
2019-03-22 17:02:26 +01:00
Daniel Hahler
5df45f5b27
Use fixup_namespace_packages also with pytester.syspathinsert
2019-03-22 17:02:26 +01:00
Daniel Hahler
05d55b86df
tests: minor sys.path cleanup
2019-03-22 16:20:55 +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
7a6bcc3639
Add reference to test_cmdline_python_namespace_package
2019-03-22 13:23:44 +01:00
Daniel Hahler
8e125c9759
doc/en/reference.rst: whitespace/alignment
2019-03-22 13:23:44 +01:00
Daniel Hahler
ade773390a
minor: rename inner test
2019-03-22 13:23:44 +01:00
Daniel Hahler
5c26ba9cb1
minor: wrap_session: s/Spurious/unexpected/
2019-03-22 13:23:44 +01:00
Daniel Hahler
5a544d4fac
tox.ini: usedevelop implies skipsdist
2019-03-22 13:23:44 +01:00
Daniel Hahler
2e7d6a6202
Fix test_assertrewrite in verbose mode
...
Fixes https://github.com/pytest-dev/pytest/issues/4879 .
2019-03-22 13:00:35 +01:00
Daniel Hahler
ea7357bc58
ci: PYTEST_ADDOPTS=-vv in general
...
This is useful when viewing logs, especially with hanging tests.
Uses non-verbose mode with a single job for full coverage.
2019-03-22 07:56:15 +01:00
Bruno Oliveira
b3319a6074
Merge pull request #4944 from henrykironde/k-EXPRESSION
...
Add example for k flag
2019-03-21 19:33:53 -03:00
Bruno Oliveira
c9628c52d6
Merge pull request #4971 from bskinn/patch-1
...
Fix pytestmark syntax in reference.rst
2019-03-21 18:59:25 -03:00
Brian Skinn
dcbdcc729b
Fix pytestmark syntax in reference.rst
...
pytest 4.3.1 throws an error if `pytestmark` is set to a tuple of marks; it appears to insist on a list.
With `pytestmark = [pytest.mark.api, pytest.mark.good]`:
```
============================== test session starts ==============================
platform win32 -- Python 3.6.3, pytest-4.3.1, py-1.8.0, pluggy-0.9.0
rootdir: C:\Temp\git\sphobjinv, inifile: tox.ini
plugins: timeout-1.3.3
collected 48 items / 41 deselected / 7 selected
tests\test_api_good.py ....... [100%]
==================== 7 passed, 41 deselected in 0.15 seconds ====================
```
With `pytestmark = (pytest.mark.api, pytest.mark.good)`:
```
==================================== ERRORS =====================================
____________________ ERROR collecting tests/test_api_good.py ____________________
env\lib\site-packages\_pytest\runner.py:226: in from_call
result = func()
env\lib\site-packages\_pytest\runner.py:289: in <lambda>
call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
env\lib\site-packages\_pytest\python.py:435: in collect
self._inject_setup_module_fixture()
env\lib\site-packages\_pytest\python.py:447: in _inject_setup_module_fixture
setup_module = _get_non_fixture_func(self.obj, "setUpModule")
env\lib\site-packages\_pytest\python.py:255: in obj
self.own_markers.extend(get_unpacked_marks(self.obj))
env\lib\site-packages\_pytest\mark\structures.py:244: in get_unpacked_marks
return normalize_mark_list(mark_list)
env\lib\site-packages\_pytest\mark\structures.py:259: in normalize_mark_list
raise TypeError("got {!r} instead of Mark".format(mark))
E TypeError: got (MarkDecorator(mark=Mark(name='api', args=(), kwargs={})), MarkDecorator(mark=Mark(name='good', args=(), kwargs={}))) instead of Mark
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
==================== 19 deselected, 1 error in 0.27 seconds =====================
```
2019-03-21 15:14:28 -04:00
Daniel Hahler
15d608867d
Merge pull request #4966 from blueyed/fix-preparse
...
config: fix consider_preparse with missing argument to -p
2019-03-21 19:12:57 +01:00
Daniel Hahler
ea2c6b8a88
config: fix consider_preparse with missing argument to -p
...
This is only required after/with 415899d4 - otherwise argparse ensures
there is an argument already.
2019-03-21 17:05:22 +01:00
Daniel Hahler
0e6cf0ff28
Merge pull request #4967 from blueyed/p-no-default
...
Fix some issues related to "-p no:X" with default_plugins
2019-03-21 17:02:34 +01:00
Daniel Hahler
553951c443
Fix some issues related to "-p no:X" with default_plugins
2019-03-21 17:01:50 +01:00
Bruno Oliveira
15ef168821
Merge pull request #4962 from blueyed/test_report_collect_after_half_a_second
...
tests: add test_report_collect_after_half_a_second
2019-03-20 19:35:08 -03:00
Daniel Hahler
cc6e5ec345
tests: add test_report_collect_after_half_a_second
...
This is meant for stable coverage with "collecting X item(s)".
2019-03-20 22:13:11 +01:00
Daniel Hahler
77643122a8
Merge pull request #4963 from blueyed/twisted
...
ci: rename "trial" tox factor to "twisted"
2019-03-20 21:58:48 +01:00
Daniel Hahler
832cef953b
Merge pull request #4964 from blueyed/mkdir
...
Revisit mkdir/_ensure_supporting_files in cacheprovider
2019-03-20 21:58:24 +01:00
Daniel Hahler
bcdbb6b677
Revisit mkdir/_ensure_supporting_files in cacheprovider
...
- cacheprovider: move call to _ensure_supporting_files
This makes it less likely to have a race here (which is not critical),
but happened previously probably with xdist, causing flaky coverage with
`if not readme_path.is_file():` etc checks in
`_ensure_supporting_files`, which has been removed in the `features`
branch already.
2019-03-20 19:00:11 +01:00
Daniel Hahler
543779fc43
tox: generic twisted factor
2019-03-20 18:41:48 +01:00
Daniel Hahler
2ade3d5c89
ci: rename "trial" tox factor to "twisted"
...
Ref: https://github.com/pytest-dev/pytest/pull/4848#issuecomment-467909204
2019-03-20 18:38:50 +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
f7171034f9
terminal: remove unnecessary check in _get_progress_information_message
...
All calls to _get_progress_information_message are only done for
`_show_progress_info`, which is `False` with `capture=no`.
2019-03-20 03:04:41 +01:00
Daniel Hahler
c7c120fba6
terminal: handle "capture" option not being available
...
This is the case with `-p no:capture` now.
2019-03-20 03:01:26 +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
Daniel Hahler
da81c1e49a
Merge pull request #4950 from blueyed/capture
...
Revisit capturing module: repr, doc fixes, minor
2019-03-20 01:12:22 +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
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
7395501d1d
Easier read with _colorama_workaround/_readline_workaround
2019-03-19 01:17:21 +01:00
Daniel Hahler
920bffbfbb
Revisit _pytest.capture: repr, doc fixes, minor
2019-03-19 01:17:21 +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
henrykironde
1e3d5a0412
Add example for k flag
...
Includes an example of multiple expressions
2019-03-17 22:33:16 -04: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
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
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
Bruno Oliveira
492cc4219c
Prepare release 4.3.1
2019-03-11 12:59:54 -03:00
Bruno Oliveira
51bf7c3aef
Merge pull request #4897 from altendky/4896-altendky-add_missing_hooks_to_docs
...
Add missing plugin hooks to docs
2019-03-11 12:08:56 -03:00
Bernhard M. Wiedemann
489c61a22d
Allow tests to pass after 2038
...
without this change, the python-apache-libcloud tests failed
in the year 2039 with
fp.write(struct.pack("<ll", mtime, size))
E error: 'l' format requires -2147483648 <= number <= 2147483647
2019-03-10 05:22:21 +01:00
Bruno Oliveira
0f3d630634
Merge pull request #4898 from shoyer/patch-1
...
Fix broken error message in pytester
2019-03-08 22:53:01 -03:00
Bruno Oliveira
a0f652c559
Rename 4898.trivial.rst to 4898.bugfix.rst
2019-03-08 22:41:57 -03:00
Bruno Oliveira
877b57ae9b
Add CHANGELOG entry
2019-03-08 22:33:07 -03:00
Stephan Hoyer
dc7ae41f33
Fix broken error message in pytester
2019-03-08 09:22:00 -08:00
Kyle Altendorf
2d43f42769
Add missing plugin hooks to docs
...
pytest-dev/pytest#4896
2019-03-08 09:24:01 -05:00
Bruno Oliveira
03ef546706
Merge pull request #4893 from nicoddemus/simplify-obj-property
...
Simplify 'obj' property definition in PyobjMixin
2019-03-08 02:04:28 -03:00
Daniel Hahler
de5aa3847e
Apply suggestions from code review
...
Co-Authored-By: nicoddemus <nicoddemus@gmail.com >
2019-03-07 12:53:47 -03:00
Bruno Oliveira
0f4905a259
Simplify 'obj' property definition in PyobjMixin
...
This uses modern property definition syntax, declaring both getter
and setter as obj() functions
2019-03-07 08:15:04 -03:00
Bruno Oliveira
936f725b81
Merge pull request #4890 from blueyed/dead
...
pytester: remove unused anypython fixture
2019-03-06 14:35:23 -03:00
Daniel Hahler
c86d2daf81
pytester: remove unused anypython fixture
...
This became unused after ab9f6a75 (in 2009).
2019-03-06 17:42:21 +01:00
Daniel Hahler
a70c1ca100
ci: Travis: disable cache by default, only for pre-commit
...
For pip the usual http caching should be good enough.
This keeps the cache for pre-commit with the linting env for now.
Ref: https://github.com/pytest-dev/pytest/issues/3502
2019-03-05 23:12:11 +01:00
Daniel Hahler
4668ee03f6
Merge pull request #4887 from blueyed/merge-master-into-features
...
Merge master into features
2019-03-05 23:05:55 +01:00
Daniel Hahler
236bada755
Merge pull request #4768 from horta/avoid-pkg_resources
...
Avoid pkg_resources import at the top-level.
2019-03-05 23:02:02 +01:00
Daniel Hahler
76687030f0
Merge branch 'master' into merge-master-into-features
...
Conflicts:
appveyor.yml
setup.py
2019-03-05 19:07:36 +01:00
Daniel Hahler
2b3d69da2b
Merge pull request #4865 from blueyed/revisit-cov-new
...
ci: revisit coverage reporting
2019-03-05 19:05:36 +01:00
Daniel Hahler
8481e438bd
ci: revisit coverage reporting
...
This brings coverage back that got missing with 9dcd6f2 .
Continuation of #4839 / #4846 .
2019-03-05 13:34:46 +01:00
Daniel Hahler
bd2c9bedcf
Merge pull request #4885 from blueyed/fix-master
...
Fix master: ci: Azure: remove pypy3
2019-03-04 19:32:38 +01:00
Daniel Hahler
2fe922608f
Merge pull request #4883 from blueyed/fix-coverage-includes
...
.coveragerc: fix include for pypy
2019-03-04 19:31:14 +01:00
Daniel Hahler
07fa69335c
ci: Azure: remove pypy3
...
It was enabled accidentally.
2019-03-04 18:16:20 +01:00
Daniel Hahler
ddb16a1ab1
Merge pull request #4874 from blueyed/pypy3-azure
...
ci: azure: fix coverage reporting with PyPy (not used currently)
2019-03-04 17:58:28 +01:00
Daniel Hahler
2e871f35f3
ci: Azure: clarify name for coverage job
2019-03-04 17:51:25 +01:00
Daniel Hahler
fa94e3c1b2
ci: Azure: fix coverage generation with PyPy
...
While this is not used currently, it is still good for having it covered
(it failed when running coverage with all jobs unconditionally).
2019-03-04 17:46:01 +01:00
Daniel Hahler
c6eb3413f3
.coveragerc: fix include for pypy
...
PyPy uses "site-packages" directly.
2019-03-04 17:40:05 +01:00
Daniel Hahler
54c70bc02c
Merge pull request #4878 from blueyed/fix-test_crash_on_closing_tmpfile_py27
...
tests: make test_crash_on_closing_tmpfile_py27 more reliable
2019-03-04 16:22:14 +01:00
Daniel Hahler
83558a0ba3
tests: make test_crash_on_closing_tmpfile_py27 more reliable
...
It fails reliable for me now without the fix from 9517c3a2a .
Ref: #2370
2019-03-04 15:04:55 +01:00
Bruno Oliveira
23ea04f910
Merge pull request #4860 from nicoddemus/getfixturevalue-cleanup-1895
...
getfixturevalue does not correctly declare dependency with the calling fixture
2019-03-03 15:56:45 -03:00
Daniel Hahler
c334adc78f
Apply suggestions from code review
...
Co-Authored-By: nicoddemus <nicoddemus@gmail.com >
2019-03-03 11:20:00 -03:00
Bruno Oliveira
f3f6cb2093
Merge pull request #4877 from blueyed/pluggymaster
...
tox: generic pluggymaster factor, remove env hack
2019-03-03 09:52:54 -03:00
Daniel Hahler
c4aa57bc4c
tox/setup.py: remove _PYTEST_SETUP_SKIP_PLUGGY_DEP=1 hack
2019-03-03 13:15:13 +01:00
Daniel Hahler
2970c1df24
tox: generic pluggymaster factor
2019-03-03 13:12:44 +01:00
Bruno Oliveira
35c85f0db9
Merge pull request #4876 from nicoddemus/show-testpaths-in-header-4875
...
Show testpaths option in the header if it has been used for collection
2019-03-02 13:01:50 -03:00
Bruno Oliveira
0deb7b1696
Do not show "inifile:" string if there's no configuration file
2019-03-02 11:45:08 -03:00
Bruno Oliveira
53b8aa065c
Show testpaths option in the header if it has been used for collection
...
Fix #4875
2019-03-02 11:35:32 -03:00
Bruno Oliveira
6a2d122a50
Remove code debugging leftovers
2019-03-02 09:56:15 -03:00
Bruno Oliveira
d97473e551
Add test and CHANGELOG for #1895
2019-03-02 09:39:30 -03:00
Bruno Oliveira
525639eaa0
Rename fixtures testing file to be consistent with the module name
2019-03-02 09:37:30 -03:00
Bruno Oliveira
7dceabfcb2
Ensure fixtures obtained with getfixturevalue() are finalized in the correct order
...
Fix #1895
2019-03-02 09:36:16 -03:00
Daniel Hahler
e1f97e41e3
Merge pull request #4872 from blueyed/_ensure_supporting_files
...
cacheprovider: _ensure_supporting_files: remove unused branches
2019-03-02 02:35:07 +01:00
Daniel Hahler
2d2f6cd4fd
cacheprovider: _ensure_supporting_files: remove unused branches
...
It is only called with empty/new dirs since 0385c273 .
2019-03-01 22:51:45 +01:00
Bruno Oliveira
44c940765b
Merge pull request #4868 from blueyed/pytester-unset-PYTEST_ADDOPTS
...
pytester: unset PYTEST_ADDOPTS
2019-03-01 18:48:36 -03:00
Daniel Hahler
ed68fcf665
Merge pull request #4867 from blueyed/fix-cov
...
.coveragerc: use globs with includes
2019-03-01 21:35:20 +01:00
Bruno Oliveira
907e9495a2
Merge pull request #4869 from nicoddemus/tmppath-docs
...
Add missing ref docs to tmp_path and tmp_path_factory
2019-03-01 17:22:14 -03:00
Bruno Oliveira
dac164cc99
Add missing ref docs to tmp_path and tmp_path_factory
2019-03-01 17:09:07 -03:00
Daniel Hahler
4290cacb86
Merge pull request #4864 from blueyed/isort-cfg
...
Add config for isort
2019-03-01 18:44:56 +01:00
Daniel Hahler
db5cc35b44
pytester: unset PYTEST_ADDOPTS
2019-03-01 18:43:17 +01:00
Daniel Hahler
90031edde8
Merge pull request #4847 from blueyed/tox-posargs-lsof
...
tox: split default posargs, use --lsof with single job only
2019-03-01 18:41:29 +01:00
Daniel Hahler
a96907a9db
.coveragerc: use globs with includes
...
Apparently this caused missing coverage with pdb/pexpect tests.
2019-03-01 18:26:30 +01:00
Daniel Hahler
f8160f7bc5
ci: Travis: run py37-lsof-numpy-xdist with coverage
2019-03-01 16:59:56 +01:00
Daniel Hahler
f0d7773ffa
tox: split default posargs in multiple env vars
...
This is required for combining.
Use it for new lsof facor also.
2019-03-01 16:49:51 +01:00
Bruno Oliveira
84555c89de
Merge pull request #4855 from blueyed/pdbcls-attr
...
--pdbcls: improve validation, and allow for "mod:attr.class"
2019-03-01 12:20:29 -03:00
Daniel Hahler
f7a3e001f7
pdb: allow for --pdbclass=mod:attr.class
2019-03-01 15:20:04 +01:00
Daniel Hahler
42561db1ae
Merge pull request #4863 from blueyed/remove-import
...
Move import of _format_explanation in _pytest.assertion.rewrite
2019-03-01 15:13:26 +01:00
Daniel Hahler
0d31e852b1
Run isort
2019-03-01 14:24:18 +01:00
Daniel Hahler
75e1fde668
tox.ini: add config for isort
2019-03-01 14:24:18 +01:00
Daniel Hahler
9cb71af9e5
_pytest.assertion.rewrite: move _format_explanation import
2019-03-01 14:13:28 +01:00
Bruno Oliveira
0dd4cb0f8f
Merge pull request #4862 from blueyed/encodedfile-write-typerror
...
Validate type with writing to captured output like without
2019-03-01 10:12:58 -03:00
Bruno Oliveira
33db5e081d
Tweak changelog
2019-03-01 10:09:29 -03:00
Daniel Hahler
a51dc0c7ce
Validate type with writing to captured output like without
...
Fixes https://github.com/pytest-dev/pytest/issues/4861 .
2019-03-01 14:03:51 +01:00
Bruno Oliveira
276ffa81f6
Merge pull request #4856 from blueyed/travis-no-cov-with-cron
...
ci: Travis: skip coverage with cron runs
2019-03-01 09:03:56 -03:00
Bruno Oliveira
50610311a7
Merge pull request #4859 from blueyed/tox-py27-nobyte-xdist
...
tox: add generic nobyte and numpy factors
2019-03-01 08:48:50 -03:00
Daniel Hahler
c30ab1014e
tox: add generic nobyte and numpy factors
...
Remove `py27-nobyte` from tox.ini, which was using xdist already.
Therefore this also removes `py27-xdist` from Travis.
"nobyte" was added in 036557ac to test that test_assertrewrite.py works
with a global PYTHONDONTWRITEBYTECODE=1 setting.
"numpy" is only a special dependency, and can be run together with
nobyte/xdist.
2019-03-01 09:12:16 +01:00
Bruno Oliveira
df8869cf1a
Merge pull request #4858 from blueyed/codecov-remove-flags
...
ci: codecov: remove flags completely for now
2019-02-28 20:11:09 -03:00
Daniel Hahler
8b447878dc
ci: codecov: remove flags completely for now
...
This appears to be one of the reasons for timeouts on their backend.
2019-02-28 21:24:26 +01:00
Daniel Hahler
9c590fa474
ci: Travis: skip coverage with cron runs
...
The current commit on features has 50+ uploads already:
c7bbb2a788/build
2019-02-28 19:40:24 +01:00
Daniel Hahler
a868a9ac13
pdb: validate --pdbcls option
2019-02-28 18:11:58 +01:00
Bruno Oliveira
55b78ff780
Merge pull request #4848 from blueyed/fix-test_argcomplete
...
Fix test_argcomplete: use python -m pytest
2019-02-27 14:11:53 -03:00
Daniel Hahler
ccab469a0c
Fix test_argcomplete: use python -m pytest
...
Previously it was not run with a) xdist ("-c"), and b) "python -m
pytest" ("…/pytest.py", not executable).
2019-02-27 16:52:46 +01:00
Daniel Hahler
e711a6c275
Merge pull request #4841 from blueyed/coverage-source
...
coverage: use run.include, remove --ignore-errors, send TOXENV as name to codecov
2019-02-27 13:16:31 +01:00
Daniel Hahler
c1e3128b3f
Merge pull request #4844 from blueyed/tox-pexpect
...
tox: generic pexpect factor
2019-02-27 12:33:51 +01:00
Daniel Hahler
05bb5ffb65
Merge pull request #4842 from nicoddemus/disable-bytecode-writing
...
Document how to disable caching rewritten .pyc files to disk
2019-02-27 12:11:20 +01:00
Daniel Hahler
ee95d666f8
coverage: run.include, drop --ignore-errors, codecov name
2019-02-27 12:07:19 +01:00
Daniel Hahler
1e2810e07d
tox: generic pexpect factor
2019-02-27 11:48:22 +01:00
Daniel Hahler
fec656b3b1
Apply suggestions from code review
...
Co-Authored-By: nicoddemus <nicoddemus@gmail.com >
2019-02-27 07:46:03 -03:00
Daniel Hahler
31174f3f83
.coveragerc: fix/tighten paths
2019-02-27 10:02:11 +01:00
Daniel Hahler
5a0f379289
ci: codecov: set name for uploads/builds
2019-02-27 10:02:11 +01:00
Daniel Hahler
0138e9cbb0
ci: coverage: remove --ignore-errors
...
This should not be necessary (anymore).
2019-02-27 09:57:28 +01:00
Daniel Hahler
b5cf61312b
coverage: use source=. and report.include
...
This appears to improve performance - ~4s with `tox -e py37-coverage --
testing/test_collection.py`.
2019-02-27 09:57:28 +01:00
Bruno Oliveira
16cbb3196c
Document how to disable caching rewritten .pyc files to disk
...
Also changed how the section is presented: instead of "Note" blocks, use proper
sections as those contain enough information to exist on their own.
Fix #1680
2019-02-26 20:42:59 -03:00
Bruno Oliveira
f1254c4461
Merge pull request #4840 from nicoddemus/drop-appveyor
...
Drop AppVeyor
2019-02-26 20:42:47 -03:00
Bruno Oliveira
cd9415baf2
Configure azure to enable coverage on PYTEST_COVERAGE=1, similar to Travis
2019-02-26 19:31:52 -03:00
Bruno Oliveira
6bd77c0abd
Remove appveyor.yml and related scripts
2019-02-26 19:03:53 -03:00
Bruno Oliveira
fb7ee7f42c
Add badge for azure pipelines
2019-02-26 19:01:59 -03:00
Bruno Oliveira
9dcd6f2a87
Merge pull request #4839 from blueyed/less-cov
...
Less coverage reporting
2019-02-26 18:57:30 -03:00
Daniel Hahler
e3eb26f91a
ci: Travis: no coverage by default [skip appveyor]
2019-02-26 21:56:01 +01:00
Daniel Hahler
86070f0b7d
ci: AppVeyor: no coverage reporting
...
Should be covered by Azure.
2019-02-26 21:16:04 +01:00
Daniel Hahler
3fbe100a02
ci: Travis: remove coverage from some jobs
2019-02-26 21:14:54 +01:00
Bruno Oliveira
ee62674322
Merge pull request #4831 from nicoddemus/codocov-azure
...
Upload code coverage from azure
2019-02-26 14:42:14 -03:00
Daniel Hahler
a4192160ce
Merge pull request #4837 from blueyed/travis-install
...
ci: Travis: use single install section
2019-02-26 17:20:05 +01:00
Daniel Hahler
4d9296c71f
ci: Travis: use single install section
2019-02-26 17:06:03 +01:00
Bruno Oliveira
d5d190335c
Upload code coverage from azure
2019-02-26 16:56:25 +01:00
Bruno Oliveira
7428064f79
Merge pull request #4836 from blueyed/travis-pluggymaster-xdist
...
ci: xdist with pluggymaster
2019-02-26 12:52:59 -03:00
Bruno Oliveira
af706edd59
Merge pull request #4835 from blueyed/travis-macos
...
Travis: improve macos setup (py37)
2019-02-26 12:42:51 -03:00
Daniel Hahler
4eb40ef283
ci: azure: use xdist with pluggymaster
2019-02-26 14:03:15 +01:00
Daniel Hahler
f85f36ed03
AppVeyor: drop pluggymaster
2019-02-26 14:01:37 +01:00
Daniel Hahler
904f1ca1ce
ci: Travis: macos: use existing py37
...
`brew update` and `brew upgrade python` is very slow.
This uses the existing `/usr/local/bin/python3` (3.7.0).
2019-02-26 13:55:52 +01:00
Daniel Hahler
32b85e4ccc
ci: Travis: use xdist with pluggymaster jobs
2019-02-26 12:57:27 +01:00
Daniel Hahler
c7bbb2a788
Merge pull request #4833 from blueyed/merge-master
...
Merge master into features
2019-02-26 12:40:15 +01:00
Daniel Hahler
29112d7e0b
Merge master into features
2019-02-26 11:48:10 +01:00
Bruno Oliveira
3fd2f43fb6
Merge pull request #4828 from Zac-HD/mark-docs
...
Clarify docs on --strict marks
2019-02-25 10:07:40 -03:00
Bruno Oliveira
2cf1de3f2d
Merge pull request #4727 from nicoddemus/early-load-4718
...
Change -p so it is possible to early load setuptools plugins
2019-02-25 10:05:51 -03:00
Zac-HD
d9bdf5cfca
Clarify docs on --strict marks
2019-02-25 22:30:49 +11:00
Anthony Sottile
f494eefcae
Merge pull request #4823 from nicoddemus/unittest2env
...
Add unittest2 testing to trial environment
2019-02-24 10:33:26 -08:00
Anthony Sottile
c9e69438b1
Merge pull request #4822 from nicoddemus/funcsigs
...
Require funcsigs>=1.0 on Python 2.7
2019-02-24 09:14:09 -08:00
Bruno Oliveira
2e89812fad
Add unittest2 testing to trial environment
...
Just noticed that `test_usefixtures_marker_on_unittest` is parametrized
for unittest2, but no environment ever installed that library.
2019-02-24 13:21:00 -03:00
Bruno Oliveira
a0207274f4
-p option now can be used to early-load plugins by entry-point name
...
Fixes #4718
2019-02-24 13:20:17 -03:00
Bruno Oliveira
759d7fde5d
Merge pull request #4786 from blueyed/av
...
AppVeyor: use xdist with pypy, drop pluggymaster
2019-02-24 12:17:59 -03:00
Bruno Oliveira
a0f5c4c8f5
Merge pull request #4799 from blueyed/codecov
...
codecov: use only linux/windows/osx flags
2019-02-24 12:16:51 -03:00
Bruno Oliveira
2e210acd00
Merge pull request #4819 from Handsome2734/doc-fix
...
add notice to use [tool:pytest] in setup.cfg
2019-02-24 12:16:30 -03:00
Bruno Oliveira
ede6387caa
Require funcsigs>=1.0 on Python 2.7
...
Fix #4815
2019-02-24 12:11:08 -03:00
Anthony Sottile
ff25b52110
Merge pull request #4820 from nicoddemus/fix-test-prefix
...
Fix docs about pytest conventions for test functions
2019-02-23 12:02:04 -08:00
Daniel Hahler
dc8c27037a
AppVeyor: drop pluggymaster
2019-02-23 20:15:11 +01:00
Bruno Oliveira
3e11bd0d6e
Update wording about [tool:pytest] in setup.cfg files
2019-02-23 15:32:42 -03:00
Bruno Oliveira
6a4c7063fd
Fix docs about pytest conventions for test functions
...
Fix #4818
2019-02-23 15:22:27 -03:00
songbowen
15fe60aa25
add notice to use [tool:pytest] in setup.cfg
2019-02-24 00:24:56 +08:00
Daniel Hahler
1ec7f60484
codecov: use only linux/windows flags
...
Using many flags are a reason for timeouts on Codecov's backend.
2019-02-23 08:28:08 +01:00
Daniel Hahler
63e7f8e340
Merge pull request #4817 from nicoddemus/merge-master-into-features
...
Merge master into features (including fix from 4816)
2019-02-23 08:24:21 +01:00
Bruno Oliveira
1cf9c2e76f
Merge pull request #4816 from nicoddemus/fix-new-pluggy
...
Fix test failures after pluggy 1.8 release
2019-02-22 22:42:40 -03:00
Bruno Oliveira
0ca1f6e0f4
Merge branch 'fix-new-pluggy' into merge-master-into-features
2019-02-22 18:59:51 -03:00
Bruno Oliveira
a68f4fd2b9
Fix test failures after pluggy 1.8 release
...
pluggy now calls iter_entry_points with different arguments, and tests
which mocked that call need to be updated accordingly.
2019-02-22 18:58:54 -03:00
Bruno Oliveira
5b35241470
Merge pull request #4812 from mitzkia/logging_from_runtest_logreport
...
Logging: Make pytest_runtest_logreport() hook available for logging
2019-02-22 18:47:06 -03:00
Andras Mitzki
b26b731498
Logging: Make pytest_runtest_logreport() available for logging
...
Signed-off-by: Andras Mitzki <andras.mitzki@balabit.com >
2019-02-22 05:14:44 +01:00
Anthony Sottile
da305966d2
Merge pull request #4793 from nicoddemus/azure-include-more-envs
...
Add same environments to Azure, except py37-freeze
2019-02-21 09:15:44 -08:00
Bruno Oliveira
4ee10d2266
Merge pull request #4813 from discdiver/patch-1
...
Doc update - recommend use venv instead of virtualenv
2019-02-21 14:06:36 -03:00
Bruno Oliveira
e1aeb6915e
Fix linting
2019-02-21 13:27:12 -03:00
Bruno Oliveira
e75915bb73
Revert recommending virtualenv for Python 3.4
...
`venv` is already available in Python 3.4, my mistake
2019-02-21 13:03:19 -03:00
Bruno Oliveira
ba2a43266a
Mention that virtualenv should be used for Python 3.4 as well
2019-02-21 12:52:09 -03:00
Jeff Hale
cfaa8bbee8
recommend venv or virtualenv, depending on python version
...
venv has been installed with Python since 3.3. https://docs.python.org/3/library/venv.html
2019-02-21 10:50:49 -05:00
Jeff Hale
6b661795cf
update links.inc to include both venv and virtualenv
2019-02-21 10:41:59 -05:00
Jeff Hale
fa65b71c98
Merge pull request #1 from discdiver/discdiver-patch-1
...
update links for virtualenv -> venv
2019-02-20 15:41:39 -05:00
Jeff Hale
da5dec83f6
update links for virtualenv -> venv
2019-02-20 15:36:34 -05:00
Jeff Hale
2ef3cb2510
Recommend use venv instead of virtualenv
...
From the Python docs:
"Changed in version 3.5: The use of venv is now recommended for creating virtual environments."
-https://docs.python.org/3/library/venv.html
2019-02-20 15:33:48 -05:00
Zac Hatfield-Dodds
c8a87e48ab
Merge pull request #4783 from gyermolenko/fix_syntax_highlighting_for_two_rst_docs
...
Fix sphinx code-block types (syntax highlighting) in two docs
2019-02-20 06:31:10 +11:00
Bruno Oliveira
b9561e29ff
Merge pull request #4808 from nicoddemus/merge-master-into-features
...
Merge master into features
2019-02-19 08:08:06 -03:00
Bruno Oliveira
bf6dcd64dc
Merge pull request #4757 from blueyed/pypy
...
Travis: use pypy from Xenial, add pypy3
2019-02-18 19:55:43 -03:00
Daniel Hahler
214c331236
Travis: use pypy from Xenial, add pypy3
2019-02-18 22:32:31 +01:00
Bruno Oliveira
9cb504ca9a
Add same environments to Azure as have in AppVeyor, except py37-freeze
...
py37-freeze will be tackled in https://github.com/pytest-dev/pytest/issues/4807
2019-02-18 17:23:39 -03:00
Bruno Oliveira
f0a9f9042f
Merge pull request #4805 from nicoddemus/release-4.3.0
...
Release 4.3.0
2019-02-18 17:18:50 -03:00
Daniel Hahler
ff015f6308
Fix docs (tox -e regen, plus pre-commit)
2019-02-18 18:46:03 +01:00
Bruno Oliveira
eeac28f4ab
Merge pull request #4804 from asottile/fix_py38
...
Fix python3.8 / pypy failures
2019-02-18 12:59:21 -03:00
Anthony Sottile
5505826db9
Fix python3.8 / pypy failures
2019-02-16 11:23:23 -08:00
Bruno Oliveira
31c869b4c4
Preparing release version 4.3.0
2019-02-16 14:11:58 +00:00
Bruno Oliveira
0395996756
Merge remote-tracking branch 'upstream/master' into release-4.3.0
2019-02-16 14:06:51 +00:00
Bruno Oliveira
986dd84375
LoggingPlugin: Support to customize log_file from hook ( #4752 )
...
LoggingPlugin: Support to customize log_file from hook
2019-02-16 12:01:21 -02:00
Bruno Oliveira
a36e986920
Merge pull request #4803 from blueyed/travis-cron
...
Travis: remove cron_only stage, use conditional job
2019-02-16 11:29:51 -02:00
Anthony Sottile
68dc433bf5
Merge pull request #4802 from gyermolenko/fix_code_block_in_Node_docstring
...
Fix code-block in Node docstring
2019-02-15 20:09:32 -05:00
Daniel Hahler
e59fc730f8
Merge pull request #4801 from gyermolenko/add_talk
...
Add good talk by Andrew Svetlov
2019-02-16 01:42:39 +01:00
Daniel Hahler
4f9e835472
Travis: remove cron_only stage, use conditional job
...
Ref: https://github.com/pytest-dev/pytest/pull/4789#issuecomment-464135675
2019-02-15 18:53:43 +01:00
Daniel Hahler
498b994eb4
Merge pull request #4787 from blueyed/travis-xdist
...
Travis: use xdist for py?? envs, keeping py27/py37
2019-02-15 18:35:21 +01:00
Daniel Hahler
40eef6da0c
AppVeyor: use xdist for py?? envs, drop py27/py37
2019-02-15 17:55:01 +01:00
Daniel Hahler
71373b04b0
tox: add generic xdist factor
...
Cherry-picked from features.
Conflicts:
tox.ini
2019-02-15 17:54:44 +01:00
Daniel Hahler
6fb7269979
terminal: write_fspath_result: work around py bug
2019-02-15 17:47:00 +01:00
Daniel Hahler
3460105def
Travis: use xdist for py?? envs, keeping py27/py37
2019-02-15 17:46:58 +01:00
Andras Mitzki
e3824d23bc
LoggingPlugin: Expose setting log_file_handler
...
- This patch allows to set log_file (path) from hook
Signed-off-by: Thomas Hisch
Signed-off-by: Andras Mitzki <andras.mitzki@balabit.com >
2019-02-15 16:05:10 +01:00
Grygorii Iermolenko
80ad448590
Fix code-block in Node docstring
2019-02-15 16:12:10 +02:00
Grygorii Iermolenko
59f69dd9e7
Add good talk by Andrew Svetlov
2019-02-15 15:37:18 +02:00
Grygorii Iermolenko
6e1ee0802f
Fix sphinx code-block types for remaining rst docs
2019-02-15 15:10:37 +02:00
Grygorii Iermolenko
5cf58a9ae9
Revert '$' changes to not trigger regendoc
2019-02-15 14:09:37 +02:00
Daniel Hahler
2106515f6d
Merge pull request #4796 from cclauss/patch-1
...
Travis CI: The 'sudo' tag is now deprecated
2019-02-14 18:06:40 +01:00
Anthony Sottile
66b4709830
Merge pull request #4798 from nicoddemus/remove-message-docs
...
Remove 'message' parameter docs from assert.rst
2019-02-14 09:37:22 -05:00
Daniel Hahler
0b1f813c38
Merge pull request #4784 from blueyed/fix-4782
...
collect: python: fix `AssertionError` with broken symlinks
2019-02-14 15:10:14 +01:00
Bruno Oliveira
0b6960446e
Merge pull request #4795 from ramatevish/update-attr-kwarg
...
Update kwarg for attr.ib to use 'converter' as 'convert' is due to be deprecated.
2019-02-14 08:37:34 -02:00
Bruno Oliveira
4bc2f96c93
Remove 'message' parameter docs from assert.rst
...
As per:
https://github.com/pytest-dev/pytest/issues/3974#issuecomment-463462732
Also made the 'match' parameter more prominent
2019-02-14 08:32:49 -02:00
cclauss
0e4750d837
Travis CI: The 'sudo' tag is now deprecated
...
[Travis are now recommending removing the __sudo__ tag](https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration ).
2019-02-14 09:40:00 +01:00
R. Alex Matevish
40cec637d7
Update kwarg for attr.ib to use 'converter' as 'convert' is due to be deprecated
2019-02-14 00:03:41 -08:00
Daniel Hahler
407d4a0cf0
collect: python: fix AssertionError with broken symlinks
...
Fixes https://github.com/pytest-dev/pytest/issues/4782 .
2019-02-14 00:18:14 +01:00
Daniel Hahler
c84ae0bb7a
Merge pull request #4789 from blueyed/travis-pluggymaster-cron
...
Travis: add cron_only stage for py38-dev
2019-02-13 22:03:41 +01:00
Daniel Hahler
1dbf440194
Merge pull request #4785 from blueyed/merge-master-into-features
...
Merge master into features
2019-02-13 20:23:24 +01:00
Daniel Hahler
afaaa7e411
Travis: test py38-dev only with cron builds
...
The master and features branches are tested daily.
2019-02-13 19:02:02 +01:00
Daniel Hahler
7b91952645
Merge master into features
...
Conflicts:
tox.ini
2019-02-13 17:58:16 +01:00
Grygorii Iermolenko
799bcccd1b
Fix sphinx code-block types (syntax highlighting) in two docs
2019-02-13 17:08:49 +02:00
Bruno Oliveira
8726be27a6
Merge pull request #4779 from pytest-dev/azure-pipelines
...
Set up CI with Azure Pipelines [skip travis] [skip appveyor]
2019-02-13 08:39:32 -02:00
Bruno Oliveira
e26c5bda6e
Merge pull request #4776 from nicoddemus/release-4.2.1
...
Preparing release version 4.2.1
2019-02-13 08:39:24 -02:00
Anthony Sottile
f672b7e39e
Merge pull request #4773 from nicoddemus/remove-py27-py34-deprecation-warning
...
Remove py27 py34 deprecation warning
2019-02-12 21:42:07 -05:00
Anthony Sottile
f0e6bf7604
Merge pull request #4775 from asottile/stdlib
...
Replace flatten() with chain.from_iterable
2019-02-12 21:37:05 -05:00
Bruno Oliveira
f729d5d4ee
Remove --color=yes from PYTEST_ADDOPTS [skip travis] [skip appveyor]
...
Does not work on Azure Pipelines at all unfortunately
2019-02-12 20:34:51 -02:00
Bruno Oliveira
04a941c818
Pass PYTEST_ADDOPTS to tox envs [skip travis] [skip appveyor]
2019-02-12 20:31:29 -02:00
Bruno Oliveira
215d537624
Set junitxml and colors using PYTEST_ADDOPTS [skip travis] [skip appveyor]
2019-02-12 20:24:32 -02:00
Bruno Oliveira
f63fbf8114
Merge pull request #4767 from blueyed/appveyor-xdist
...
AppVeyor: use xdist for py?? envs, drop py27/py37
2019-02-12 20:04:45 -02:00
Bruno Oliveira
b595587031
Set up CI with Azure Pipelines [skip travis] [skip appveyor]
...
Just a few environments for now to see how it will behave for a few days
2019-02-12 20:01:13 -02:00
Bruno Oliveira
82cc3d8cc2
Preparing release version 4.2.1
2019-02-12 20:17:06 +00:00
Bruno Oliveira
e20e376881
Merge pull request #4347 from blueyed/pdb-recursive-capture
...
pdbpp: fix capturing with recursive debugging
2019-02-12 16:53:14 -02:00
Bruno Oliveira
8052d01a37
Merge pull request #4774 from sambrightman/pin-more_itertools
...
Constrain more_itertools for Python 2.7 compatibility
2019-02-12 16:48:51 -02:00
Bruno Oliveira
d03444db4a
Merge pull request #4651 from blueyed/help-with-argumenterror
...
Display --help/--version with ArgumentErrors
2019-02-12 16:01:49 -02:00
Anthony Sottile
f9c1329dab
Replace flatten() with chain.from_iterable
...
flatten is an alias in more-itertools anyway
2019-02-12 06:30:00 -08:00
Sam Brightman
a8003286b5
Add CHANGELOG entry for #4770
2019-02-12 13:32:06 +00:00
Daniel Hahler
747a8ae3a6
AppVeyor: use xdist for py?? envs, drop py27/py37
2019-02-12 14:26:57 +01:00
Bruno Oliveira
b759ebdb93
Add CHANGELOG entry for #4698
2019-02-12 10:39:58 -02:00
Bruno Oliveira
b41632e9a8
Revert "Show deprecation message when running under Python 2.7 and 3.4"
...
This reverts commit eb92e57509 .
2019-02-12 10:39:25 -02:00
Sam Brightman
b4be228330
Constrain more_itertools for Python 2.7 compatibility
...
Fixes #4772 , #4770 .
2019-02-12 11:53:23 +00:00
Danilo Horta
821b6ef2a6
Avoid pkg_resources import at the top-level.
2019-02-11 23:26:35 +00:00
Daniel Hahler
31c948184a
Merge pull request #4753 from blueyed/tox-xdist
...
tox: add generic xdist factor
2019-02-11 23:36:59 +01:00
Bruno Oliveira
67dd10de26
Merge pull request #4763 from blueyed/lsof
...
--lsof: suppress stderr
2019-02-11 13:18:40 -02:00
Daniel Hahler
f13935da53
Display --help/--version with ArgumentErrors
2019-02-11 15:49:48 +01:00
Daniel Hahler
dc8af18a0e
Merge pull request #4745 from blueyed/test_collect_pkg_init_and_file_in_args
...
Fix handling of pkg init and test file via args
2019-02-11 15:11:40 +01:00
Daniel Hahler
7bee359459
tox: add generic xdist factor
2019-02-11 15:09:07 +01:00
Daniel Hahler
61b9246afe
Fix/improve handling of pkg init and test file via args
...
Ref: https://github.com/pytest-dev/pytest/issues/4344#issuecomment-441095934
2019-02-11 15:04:24 +01:00
Daniel Hahler
9feb4941f4
pdb: fix capturing with recursive debugging and pdb++
...
While I think that pdb++ should be fixed in this regard (by using
`pdb.Pdb`, and not `self.__class__` maybe), this ensures that custom
debuggers like this are working.
2019-02-11 14:52:20 +01:00
Daniel Hahler
237f690f8b
--lsof: suppress stderr
...
This can spam a lot of warnings (per invocation), e.g.:
> lsof: WARNING: can't stat() nsfs file system /run/docker/netns/default
Output information may be incomplete.
Or from Travis/MacOS:
> lsof: WARNING: can't stat() vmhgfs file system /Volumes/VMware Shared Folders
> Output information may be incomplete.
> assuming "dev=31000003" from mount table
2019-02-11 14:08:44 +01:00
Ronny Pfannschmidt
386e801a5a
Merge pull request #4762 from blueyed/pluggymaster
...
tox: use deps for pluggymaster testenvs
2019-02-11 05:30:30 +01:00
Bruno Oliveira
5cf05ce149
Merge pull request #4764 from kevinjfoley/doc-assert-clarify
...
Clarify pytest_assertrepr_compare docs per #4759
2019-02-10 17:26:50 -02:00
Kevin J. Foley
aee67bb1a7
Clarify pytest_assertrepr_compare docs per #4759
2019-02-10 08:34:35 -05:00
Daniel Hahler
5e2d740829
tox: cleanup/revisit deps
2019-02-10 14:02:56 +01:00
Daniel Hahler
82b8ec37fc
Bump tox minversion
...
For c611a16afe
2019-02-10 13:57:49 +01:00
Daniel Hahler
f73fa47b1f
Use coverage with pluggymaster
2019-02-10 13:54:58 +01:00
Daniel Hahler
fd1684e70b
tox: use deps for pluggymaster testenvs
...
https://github.com/tox-dev/tox/issues/706 has been fixed.
2019-02-10 13:53:49 +01:00
Anthony Sottile
19501028ca
Merge pull request #4743 from nicoddemus/junit-ref
...
Document junit_family option in the reference docs
2019-02-09 08:02:55 -08:00
Daniel Hahler
ed01dc6567
Merge pull request #4652 from blueyed/RunResult-repr
...
Add __repr__ for RunResult
2019-02-09 01:26:24 +01:00
Bruno Oliveira
3a366f451a
Merge pull request #4741 from thisch/refactor_terminalreporter
...
Remove terminal_reporter workaround from logging.py
2019-02-08 21:47:53 -02:00
Bruno Oliveira
7f6108beb1
Add ref docs for junit_family option
2019-02-08 21:44:52 -02:00
Bruno Oliveira
76b0660f47
Merge pull request #4754 from nicoddemus/ignore-pip-wheel-metadata
...
Ignore pip-generated 'pip-wheel-metadata' folder [skip ci]
2019-02-08 21:37:04 -02:00
Daniel Hahler
fc8800c71f
Merge pull request #4722 from fetzerch/ignore_wildcards
...
Add ability to use globs when using --ignore
2019-02-09 00:11:04 +01:00
Bruno Oliveira
75a12b9d2b
Ignore pip-generated 'pip-wheel-metadata' folder [skip ci]
2019-02-08 21:06:33 -02:00
Daniel Hahler
9bcbf552d6
Add __repr__ for RunResult
2019-02-08 23:41:20 +01:00
Bruno Oliveira
32c6d4f603
Merge pull request #4738 from pstradomski/master
...
Fix "ValueError: Plugin already registered" exceptions when running in build directories that symlink to actual source.
2019-02-08 19:57:14 -02:00
Daniel Hahler
b4b2f58eab
Merge pull request #4747 from blueyed/visit-filter
...
pytest.main: collect: factor out _visit_filter
2019-02-08 22:19:38 +01:00
Daniel Hahler
a131cd6c3b
Merge pull request #4749 from blueyed/merge-master-into-features
...
Merge master into features
2019-02-08 22:05:43 +01:00
Daniel Hahler
9c03196e79
Merge master into features
2019-02-08 22:02:29 +01:00
Daniel Hahler
8b92d10fb3
Merge pull request #4751 from blueyed/fix-py-freeze
...
tox: py37-freeze: use --no-use-pep517 for PyInstaller
2019-02-08 22:01:59 +01:00
Bruno Oliveira
8e220f0e6f
Merge pull request #4746 from nicoddemus/isolated-build
...
Use isolated_build option in tox.ini
2019-02-08 18:59:43 -02:00
Daniel Hahler
e191a65ebb
tox: py37-freeze: use --no-use-pep517 for PyInstaller
...
Fixes https://github.com/pytest-dev/pytest/issues/4750 .
2019-02-08 21:59:23 +01:00
Daniel Hahler
5ca81596bb
Merge pull request #4744 from blueyed/fix-4592-collectfile
...
Fix handling of collect_ignore from parent conftest
2019-02-08 20:58:11 +01:00
Daniel Hahler
64e8185ff7
Merge master into features
2019-02-08 20:09:09 +01:00
Daniel Hahler
7bb504b807
pytest.main: collect: factor out _visit_filter
2019-02-08 19:28:12 +01:00
Bruno Oliveira
9be069f899
Use isolated_build option in tox.ini
...
As per the excellent article by gaborbernat:
https://www.bernat.tech/pep-517-518/
2019-02-08 15:50:33 -02:00
Daniel Hahler
913a2da6e5
Fix handling of collect_ignore from parent conftest
...
`_collectfile` should be called on files only.
Fixes https://github.com/pytest-dev/pytest/issues/4592 .
2019-02-08 18:46:43 +01:00
Anthony Sottile
ea732464aa
Merge pull request #4740 from asottile/bugfix_4739
...
Fix `parametrize(... ids=<function>)` when the function returns non-strings
2019-02-07 21:47:33 -08:00
Thomas Hisch
ddbea29c12
Remove terminal_reporter workaround from logging.py
...
The workaround was removed from the logging module by creating python
properties for verbosity related settings in the terminalreporter.
Closes : #4733
2019-02-07 22:52:07 +01:00
Anthony Sottile
4c7ddb8d9b
Fix parametrize(... ids=<function>) when the function returns non-strings.
2019-02-07 12:25:59 -08:00
Thomas Hisch
a1fcd6e445
Merge pull request #4734 from thisch/refactor_clilogging
...
Refactor _setup_cli_logging code
2019-02-07 20:15:41 +01:00
Thomas Hisch
7b8fd0cc12
Refactor _setup_cli_logging code
...
Change the indentation in _setup_cli_logging by moving the
self._log_cli_enabled check outside of the _setup_cli_logging method.
2019-02-07 19:39:12 +01:00
Paweł Stradomski
391dc549c0
Add comment on why realpath is needed
2019-02-07 12:56:13 +01:00
Ronny Pfannschmidt
526f4a95cc
Merge pull request #4735 from kohr-h/pytest_plugins_module_name
...
Mention that `pytest_plugins` should not be used as module name
2019-02-07 07:07:58 +01:00
Ronny Pfannschmidt
4cd268dc5d
Merge pull request #4724 from nicoddemus/pytest-warns-kwargs
...
emit warning when pytest.warns receives unknown keyword arguments
2019-02-07 07:04:25 +01:00
Paweł Stradomski
59e6fb94b5
Fix "ValueError: Plugin already registered" exceptions when running in build directories that symlink to actual source.
2019-02-07 02:05:22 +01:00
Bruno Oliveira
2f083504ee
Merge pull request #4709 from namurphy/warns-docs
...
Document how to customize test failure message for missing warnings
2019-02-06 20:51:14 -02:00
Zac Hatfield-Dodds
3384ffc6eb
Merge pull request #4725 from nicoddemus/collection-finish
...
Call pytest_report_collectionfinish hook when --collect-only is passed
2019-02-06 12:38:12 -10:00
Bruno Oliveira
e276bd3332
pytest.warns emits a warning on unknown keyword arguments
2019-02-06 19:52:13 -02:00
Holger Kohr
7445b5345f
Mention that pytest_plugins should not be used as module name
2019-02-06 21:57:42 +01:00
Ronny Pfannschmidt
429485e621
Merge pull request #4720 from thisch/removesetupclilogging
...
Only call _setup_cli_logging in __init__
2019-02-06 20:05:41 +01:00
Bruno Oliveira
52d497570b
Merge pull request #4731 from nicoddemus/travis-py38
...
Add py38-dev job to Travis
2019-02-06 16:24:07 -02:00
Christian Fetzer
1876a928d3
Document collect_ignore and collect_ignore_glob in reference
2019-02-06 17:15:30 +01:00
Christian Fetzer
2dc2a19db5
Add ability to exclude files matching glob patterns in conftest.py
...
This adds the `collect_ignore_glob` option for `conftest.py` to allow
Unix-style wildcards for excluding files.
2019-02-06 16:49:43 +01:00
Bruno Oliveira
0c5e717f43
Add py38-dev job to Travis
2019-02-06 13:11:00 -02:00
Bruno Oliveira
54af0f4c65
Call pytest_report_collectionfinish hook when --collect-only is passed
...
Fix #2895
2019-02-06 12:58:23 -02:00
Bruno Oliveira
678dfaa6eb
Merge pull request #4728 from nicoddemus/usage-error-module
...
Do not raise UsageError when "pytest_plugins" is a module
2019-02-06 12:22:12 -02:00
Christian Fetzer
fc5d4654e5
Add ability to exclude files matching glob patterns with --ignore-glob
...
This adds the `--ignore-glob` option to allow Unix-style wildcards so
that `--ignore-glob=integration*` excludes all tests that reside in
files starting with `integration`.
Fixes : #3711
2019-02-06 11:29:30 +01:00
Bruno Oliveira
19c93d16d1
Do not raise UsageError when "pytest_plugins" is a module
...
Fix #3899
2019-02-06 08:24:22 -02:00
Thomas Hisch
0ce8b910ca
Only call _setup_cli_logging in __init__
...
Supersedes #4719
2019-02-06 07:03:40 +01:00
Anthony Sottile
c780d1fa7c
Merge pull request #4723 from asottile/docstring_fix_py38
...
Remove workaround for docstrings for py38+
2019-02-05 15:23:48 -08:00
Bruno Oliveira
584c052da4
Fix linting and change False to True as requested in review
2019-02-05 19:04:26 -02:00
Anthony Sottile
315374008b
Remove workaround for docstrings for py38+
2019-02-05 12:48:18 -08:00
Ronny Pfannschmidt
a9457345ee
Merge pull request #4715 from nicoddemus/fix-changelog-typo
...
Fix typo in CHANGELOG
2019-02-04 13:53:48 +01:00
Bruno Oliveira
726e165932
Fix typo in CHANGELOG
2019-02-04 08:38:48 -02:00
Anthony Sottile
2264db7f4a
Merge pull request #4682 from arel/parameterize-conditional-raises-document-only
...
Document parametrizing conditional raises
2019-02-02 13:15:26 -08:00
Nick Murphy
4e93dc2c97
Update changelog for pytest.warns doc update
2019-02-01 22:11:41 -05:00
Nick Murphy
8003d8d279
Update AUTHORS
2019-02-01 21:55:01 -05:00
Nick Murphy
f0ecb25acd
Document custom failure messages for missing warnings
2019-02-01 21:48:29 -05:00
Arel Cordero
7ec1a1407a
Incorporating feedback from asottile
2019-02-02 01:57:17 +00:00
Bruno Oliveira
7dbe40092d
Merge pull request #4703 from nicoddemus/setup-class-inheritance-4700
...
Fix setUpClass being called in subclasses that were skipped
2019-02-01 16:32:27 -02:00
Bruno Oliveira
e53563ebbe
Merge pull request #4706 from hackebrot/add-xfail-note-to-4.2.0-changelog
...
Update changelog to reflect spelling change of xfail
2019-02-01 10:35:46 -02:00
Raphael Pierzina
c2c9b27771
Update changelog to reflect spelling change of xfail in teststatus report
...
Resolve #4705
2019-02-01 13:15:35 +01:00
Bruno Oliveira
c3d7340542
Fix setUpClass being called in subclasses that were skipped
...
Fix #4700
2019-01-31 20:24:11 -02:00
Bruno Oliveira
2461a43e00
Merge pull request #4697 from nicoddemus/merge-master-into-features
...
Merge master into features
2019-01-31 17:10:35 -02:00
Bruno Oliveira
7dcd9bf5ad
Merge pull request #4696 from nicoddemus/release-4.2.0
...
Release 4.2.0
2019-01-30 19:37:00 -02:00
Bruno Oliveira
fa979a4290
Preparing release version 4.2.0
2019-01-30 14:25:38 -02:00
Bruno Oliveira
e2a15c79e7
Merge pull request #4692 from nicoddemus/merge-master-into-features
...
Merge master into features
2019-01-30 14:16:09 -02:00
Bruno Oliveira
02962fabda
Merge remote-tracking branch 'upstream/features' into merge-master-into-features
2019-01-30 09:37:46 -02:00
Bruno Oliveira
b77d168d58
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-01-30 09:37:29 -02:00
Bruno Oliveira
c0e6543b5a
Fix pytest_report_teststatus call to pass new config object ( #4691 )
2019-01-30 09:36:54 -02:00
Bruno Oliveira
b96e162131
Merge pull request #4693 from asottile/flake8_3_7_0
...
fixes for flake8 3.7
2019-01-30 09:18:09 -02:00
Bruno Oliveira
1dc16ad77b
Merge pull request #4690 from nicoddemus/deprecated-python-summary
...
Show deprecation message when running under Python 2.7 and 3.4
2019-01-30 09:07:59 -02:00
Anthony Sottile
acece23697
pre-commit autoupdate
2019-01-29 21:13:32 -08:00
Anthony Sottile
e5f823a3a7
fixes for flake8 3.7
2019-01-29 21:11:15 -08:00
Bruno Oliveira
b41dc03930
Merge pull request #4691 from nicoddemus/config-terminal-summary-hook
...
Add config to pytest_terminal_summary hook
2019-01-29 21:11:37 -02:00
Bruno Oliveira
ade5f2c8c5
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-01-29 19:36:56 -02:00
Bruno Oliveira
3e0e819158
Merge pull request #4280 from blueyed/trace-quit
...
pdb: improve quitting from debugger
2019-01-29 19:14:20 -02:00
Bruno Oliveira
eb92e57509
Show deprecation message when running under Python 2.7 and 3.4
...
Fix #4627
2019-01-29 19:02:41 -02:00
Bruno Oliveira
7ad499ad76
Merge pull request #4681 from RonnyPfannschmidt/fix-4680-tmppath-is-tmpdir
...
Fix 4680 - `tmp_path` and `tmpdir` now share the same temporary directory
2019-01-29 19:00:56 -02:00
Ronny Pfannschmidt
2d7582bd92
flip around basetemp folder reset to see if it helps on windows
2019-01-29 18:58:00 +01:00
Bruno Oliveira
7e8e593a45
Add CHANGELOG entry for #4691
2019-01-29 15:52:45 -02:00
Bruno Oliveira
6c3b86369f
Add config to pytest_terminal_summary hook
...
The docs stated that this hook got the 'config' parameter in 3.5, but the docs
wre probably changed by mistake.
2019-01-29 15:41:13 -02:00
Bruno Oliveira
6aba60ab08
Merge pull request #4688 from nicoddemus/add-config-to-hooks
...
Add config to pytest_report_teststatus
2019-01-28 21:45:58 -02:00
Bruno Oliveira
d720312df0
Add CHANGELOG entry for #4688
2019-01-28 19:03:19 -02:00
Bruno Oliveira
5b09eb1d74
Add config parameter to pytest_report_teststatus hook
2019-01-28 19:00:50 -02:00
Bruno Oliveira
5119abe498
Merge pull request #4683 from nicoddemus/skip-unicode
...
Handle unittest.SkipTest exception with non-ascii characters
2019-01-28 15:50:53 -02:00
Bruno Oliveira
1c5009c3fb
Handle unittest.SkipTest exception with non-ascii characters
...
Fix #4669
2019-01-28 12:50:04 -02:00
Arel Cordero
8a1afe4213
Including note on using nullcontext in Python 3.7+
2019-01-28 13:31:08 +00:00
Arel Cordero
fd4289dae0
Adding does_not_raise to documentation only
2019-01-27 16:42:10 +00:00
Arel Cordero
977adf1354
Improving sphinx docs based on feedback
2019-01-27 16:41:23 +00:00
Arel Cordero
c1fe07276c
Adding changelog entries for does_not_raise
2019-01-27 16:41:10 +00:00
Arel Cordero
c166b80a8c
Documenting raises/does_not_raise + parametrize
2019-01-27 16:40:49 +00:00
Arel Cordero
afe9fd5ffd
Adds does_not_raise context manager
...
Addressing issues #4324 and #1830
2019-01-27 16:40:35 +00:00
Ronny Pfannschmidt
5567c772cd
quick&dirty fix fixture tests that rely on tmppath fixture structure
2019-01-27 14:19:23 +01:00
Ronny Pfannschmidt
c75bd08807
ensure tmp_path is always a realpath
2019-01-27 14:08:43 +01:00
Ronny Pfannschmidt
f7d7555521
fix #4680 - ensure tmpdir and tmp_path are the same
2019-01-27 13:05:34 +01:00
Anthony Sottile
16f8cdac95
Merge pull request #4678 from nicoddemus/raises-docs
...
Improve pytest.raises 'message' deprecation docs
2019-01-26 19:01:21 -08:00
Bruno Oliveira
9905a73ae0
Merge pull request #4511 from jhunkeler/junit-strict
...
Toggle JUnit behavior with INI option
2019-01-24 20:54:32 -02:00
Bruno Oliveira
51dd738b1a
Merge pull request #4673 from kown7/count-tests
...
Count tests
2019-01-24 20:46:29 -02:00
Bruno Oliveira
067f2c6148
Improve pytest.raises 'message' deprecation docs
...
Based on recent discussions in #3974
2019-01-24 20:41:18 -02:00
Kristoffer Nordstroem
e2cd2cd409
vanity commit
2019-01-24 23:18:21 +01:00
Bruno Oliveira
37aab5dd6b
Add CHANGELOG entry for #4660
2019-01-24 20:07:21 -02:00
Bruno Oliveira
7ddfc04793
Merge pull request #4665 from nicoddemus/group-warnings-by-message
...
Group warnings by message instead of by test id
2019-01-24 20:00:27 -02:00
Bruno Oliveira
7b10474fed
Merge pull request #4668 from wimglenn/issues/4667
...
short report summary to use report teststatus data
2019-01-24 19:59:52 -02:00
wim glenn
8cf097635e
Fixed one weird test that creates a class instead of using mocks.. ¯\_(ツ)_/¯
2019-01-24 12:59:36 -06:00
wim glenn
2d18546870
resolving report.when attribute should be reliable now
2019-01-24 11:12:59 -06:00
wim glenn
0f546c4670
pytest_terminal_summary uses result from pytest_report_teststatus hook, rather than hardcoded strings
...
Less hacky way to make XPASS yellow markup. Make sure collect reports still have a "when" attribute.
xfail changed to XFAIL in the test report, for consistency with other outcomes which are all CAPS
2019-01-24 10:17:29 -06:00
Kristoffer Nordstroem
6d38868950
fix tests by adding additional output to expected responses
2019-01-24 00:08:43 +01:00
Kristoffer Nordstroem
8723eb16ea
only print selected if any have been selected
2019-01-24 00:00:29 +01:00
Bruno Oliveira
daf39112e7
Merge pull request #4091 from nicoddemus/setup-methods-as-fixtures-3094
...
Use fixtures to invoke xunit-style fixtures
2019-01-23 19:23:31 -02:00
Bruno Oliveira
9543d1901f
Group warnings by message instead of by test id
2019-01-22 19:42:22 -02:00
Anthony Sottile
ba452dbcf0
Merge pull request #4664 from thisch/stdlibtest
...
Remove stdlib test
2019-01-22 11:28:51 -08:00
Thomas Hisch
a2954578aa
Remove stdlib test
2019-01-22 20:25:51 +01:00
Anthony Sottile
1bcb2f91cc
Merge pull request #4661 from asottile/more_py
...
remove and ban py.io.BytesIO, py.process, py.path.local.sysfind
2019-01-21 22:58:43 -08:00
Anthony Sottile
92a2c1a9c4
remove and ban py.io.BytesIO, py.process, py.path.local.sysfind
2019-01-21 19:51:16 -08:00
Kristoffer Nordstroem
9f86e83478
count selected tests
2019-01-21 23:56:39 +01:00
Anthony Sottile
f01f434311
Merge pull request #4657 from asottile/py_io_saferepr
...
copy saferepr from pylib
2019-01-21 13:25:02 -08:00
Anthony Sottile
0c6ca0da62
Fix usages of py.io.saferepr
2019-01-20 16:36:23 -08:00
Anthony Sottile
095ce2ca7f
Fix linting errors and py references in saferepr.py
2019-01-20 16:36:14 -08:00
Anthony Sottile
dbb6c18c44
copy saferepr from pylib verbatim
...
Copied from b9da2ed6178cd37d4ed6b41f9fa8234dce96973f
2019-01-20 16:30:31 -08:00
Anthony Sottile
653c685667
Merge pull request #4658 from asottile/py_deprecated_builtin
...
Remove and ban use of py.builtin
2019-01-20 14:29:00 -08:00
Anthony Sottile
ec5e279f93
Remove and ban use of py.builtin
2019-01-20 11:59:48 -08:00
Daniel Hahler
e69b1255d7
Improve quitting from pdb
...
Regarding tests: it merges ``test_pdb_interaction``,
``test_pdb_print_captured_stdout``, and
``test_pdb_print_captured_stderr`` into
``test_pdb_print_captured_stdout_and_stderr`` (clarity and performance,
especially since pexpect tests are slow).
2019-01-20 00:34:16 +01:00
Bruno Oliveira
57bf9d6740
Merge pull request #4654 from AuHau/fix/#4653-Fix_tmp_path_symlink_resolution
...
Fixes #4653 - tmp_path provides real path
2019-01-19 09:41:47 -02:00
Bruno Oliveira
677a7d06da
Merge pull request #4655 from RonnyPfannschmidt/fix-4649
...
fix #4649 - also transfer markers to keywordmapping
2019-01-19 09:40:03 -02:00
Ronny Pfannschmidt
f28b834426
fix #4649 - also transfer markers to keywordmapping
...
as it turns out it is distinct from nodekeywords and behaves completely different
2019-01-18 23:18:51 +01:00
Adam Uhlir
04bd147d46
Fixes #4653 - tmp_path provides real path
2019-01-18 12:54:00 -08:00
Bruno Oliveira
6154a5ac02
Merge pull request #4646 from nicoddemus/2.7-deprecation-docs
...
Add docs page about plans for dropping py27 and py34
2019-01-16 12:00:09 -02:00
Bruno Oliveira
1a04e8903a
Merge pull request #4537 from chdsbd/master
...
Bugfix: monkeypatch.delattr handles class descriptors
2019-01-16 08:09:59 -02:00
Joseph Hunkeler
85c5fa9f64
Update changelog
2019-01-14 22:58:41 -05:00
Joseph Hunkeler
8967976443
Ensure xml object is viable before testing family type
2019-01-14 22:58:41 -05:00
Joseph Hunkeler
bcacc40775
Update comment text
2019-01-14 22:58:41 -05:00
Joseph Hunkeler
4ecf29380a
Adds xunit2 version of test_record_attribute
2019-01-14 22:58:41 -05:00
Joseph Hunkeler
aaa7d36bc9
Change family behavior:
...
* "legacy" is no longer a copy of "xunit1"
* Attempts to use "legacy" will redirect to "xunit1"
* record_xml_attribute is not compatible outside of legacy family
* Replace call to method/override raw() with to_xml()
2019-01-14 22:58:40 -05:00
Joseph Hunkeler
8937e39afd
Raise TypeError instead of NotImplementedError if not list type
2019-01-14 22:58:40 -05:00
Joseph Hunkeler
343430c537
Replace family "old" with "legacy"
2019-01-14 22:58:40 -05:00
Joseph Hunkeler
335cc5d651
Handle backwards-compatiblity
2019-01-14 22:58:40 -05:00
Joseph Hunkeler
2e551c32b6
Add junit_family config option
2019-01-14 22:58:40 -05:00
Joseph Hunkeler
af2ee1e80a
Emit JUnit compatible XML
...
* Remove non-standard testcase elements: 'file' and 'line'
* Replace testcase element 'skips' with 'skipped'
* Time resolution uses the standard format: 0.000
* Tests use corrected XML output with proper attributes
2019-01-14 22:58:40 -05:00
Bruno Oliveira
e2a9aaf24b
Add docs page about plans for dropping py27 and py34
...
Fix #4635
2019-01-14 22:10:15 -02:00
Anthony Sottile
4947eb85c0
Merge pull request #4645 from blueyed/merge-master-into-features
...
Merge master into features
2019-01-14 14:41:27 -08:00
Daniel Hahler
1a358df998
Merge master into features
2019-01-14 17:15:39 +01:00
Anthony Sottile
5903f4596a
Merge pull request #4643 from nicoddemus/asscalar-deprecated
...
Use a.item() instead of deprecated np.asscalar(a)
2019-01-14 07:36:13 -08:00
Anthony Sottile
5bb0be1e24
Merge pull request #4615 from asottile/some_dead_code
...
Remove some dead code
2019-01-14 07:35:21 -08:00
Bruno Oliveira
6504746652
Add CHANGELOG entry for #4643
2019-01-14 09:03:23 -02:00
Bruno Oliveira
42bb0b3904
Use a.item() instead of deprecated np.asscalar(a)
...
np.asscalar() has been deprecated in numpy 1.16:
https://github.com/numpy/numpy/blob/master/doc/release/1.16.0-notes.rst#new-deprecations
2019-01-14 08:59:09 -02:00
Bruno Oliveira
1bb463a980
Merge pull request #4642 from nicoddemus/rtd-bot-config
...
Add rtd-bot configuration file
2019-01-14 05:57:50 -02:00
Anthony Sottile
16546b7342
Remove some dead code
...
- I wrote a thing: https://github.com/asottile/dead
- wanted to try it out, there's lots of false positives and I didn't look
through all the things it pointed out but here's some
2019-01-13 20:41:30 -08:00
Bruno Oliveira
f2174c16cc
Add rtd-bot configuration file [skip appveyor] [skip travis]
...
Part of the configuration necessary for https://github.com/apps/rtd-helper
2019-01-13 20:38:19 -02:00
Bruno Oliveira
e48f68953d
Merge pull request #4638 from nicoddemus/release-4.1.1
...
Preparing release version 4.1.1
2019-01-12 12:51:32 -02:00
Bruno Oliveira
25081d8e30
Merge pull request #4570 from nicoddemus/sphinx-removed-in
...
Use sphinx removed in extension in the documentation
2019-01-12 08:34:29 -02:00
Bruno Oliveira
34eeda1c09
Preparing release version 4.1.1
2019-01-12 00:55:12 +00:00
Bruno Oliveira
3efb26ae7f
Merge pull request #4632 from AnjoMan/dont-rewrite-objects-with-failing-getattr
...
Assertion rewrite breaks for objects that reimplement `__getattr__`
2019-01-11 14:07:22 -02:00
Anton Lodder
77da4f118c
Add changelog 4631 and AUTHOR credits for Anton Lodder
2019-01-10 20:48:51 -05:00
Anton Lodder
3241fc3103
Don't fail if hasattr fails when rewriting assertions
...
When rewriting assertions, pytest makes a call to
`__name__` on each object in a comparision. If one of
the objects has reimplemented `__getattr__`, they could
fail trying to fetch `__name__` with an error other than
`AttributeError`, which is what `hasattr` catches.
In this case, the stack trace for the failed `__getattr__`
call will show up in the pytest output, even though
it isn't related to the test failing.
This change fixes that by catching exceptions
that `hasattr` throws.
2019-01-10 20:45:15 -05:00
Anton Lodder
acb3e8e8a7
Test rewriting assertion when __name__ fails
...
Pytest rewrites assertions so that the items on each
side of a comoparison will have easier-to-read names
in case of an assertion error.
Before doing this, it checks to make sure the object
doesn't have a __name__ attribute; however, it uses
`hasattr` so if the objects __getattr__ is broken then
the test failure message will be the stack trace
for this failure instead of a rewritten assertion.
2019-01-10 20:45:15 -05:00
Bruno Oliveira
5f16ff3acc
Merge pull request #4212 from RonnyPfannschmidt/doctest-testmod-has-call
...
Doctest: hack in handling mock style objects
2019-01-10 19:13:45 -02:00
Bruno Oliveira
71a745270a
Merge pull request #4607 from oscarbenjamin/long_output
...
Show full repr with assert a==b and -vv
2019-01-10 12:30:46 -02:00
Bruno Oliveira
5dcb370f78
Merge pull request #4624 from nicoddemus/merge-master-into-features
...
Merge master into features
2019-01-10 12:11:20 -02:00
Bruno Oliveira
0f918b1a9d
xunit-style functions and methods are invoked by autouse fixtures
...
Fix #3094 , Fix #517
2019-01-10 12:10:04 -02:00
Ronny Pfannschmidt
a6988aa0b9
fix doctest module when a mock object is around
...
fixes #3456
2019-01-10 12:50:22 +01:00
Bruno Oliveira
2359663437
Merge pull request #4622 from nicoddemus/warningschecker-unittest
...
Change test_warningschecker_twice to a unittest
2019-01-10 06:04:25 -02:00
Anthony Sottile
bace28517e
Merge pull request #4626 from nicoddemus/goodpractices-pythonpath
...
Mention PYTHONPATH semantics in goodpractices.rst
2019-01-09 20:41:53 -08:00
Bruno Oliveira
9f6d9efc1d
Mention PYTHONPATH semantics in goodpractices.rst
...
Fix #4625
2019-01-09 22:45:09 -02:00
Bruno Oliveira
a0ab5a7cd8
Merge pull request #4609 from yoavcaspi/documentation-configuration-files
...
Documentation configuration files
2019-01-09 22:32:02 -02:00
Bruno Oliveira
ba8b3be61a
Improve CHANGELOG
2019-01-09 20:27:18 -02:00
Yoav Caspi
2467831913
rephrase warning section to explain better the issue.
2019-01-09 23:52:08 +02:00
Bruno Oliveira
e4a21b11d5
Change test_warningschecker_twice to a unittest
2019-01-09 18:58:51 -02:00
Daniel Hahler
f3b6425324
Merge pull request #4620 from Sup3rGeo/bugfix/warningschecker-twice
...
Bugfix/warningschecker twice
2019-01-09 15:36:29 +01:00
Daniel Hahler
7ee03e0996
Punctuation [ci skip]
2019-01-09 15:35:52 +01:00
Victor Maryama
081accb62c
Fixed linting in changelog.
2019-01-09 13:11:22 +01:00
Victor Maryama
fe4835c15e
Added changelog entry.
2019-01-09 12:55:15 +01:00
Victor Maryama
df3b5557d1
Reseting entered state in WarningsRecorder (fixes 4617)
2019-01-09 12:51:04 +01:00
Victor Maryama
948a5d5ac6
Added test for Issue 4617
2019-01-09 12:31:26 +01:00
Oscar Benjamin
85055a9efe
Show full repr with assert a==b and -vv
2019-01-08 01:25:05 +00:00
Yoav Caspi
149620f858
update changelog
2019-01-06 23:11:27 +02:00
Yoav Caspi
6ee5d431a0
add warning for using non canonical configuration files.
2019-01-06 23:11:24 +02:00
Anthony Sottile
a4c426b1a8
Merge pull request #4604 from asottile/uninstall_hypothesis
...
Uninstall hypothesis in regen tox env
2019-01-06 10:28:11 -08:00
Anthony Sottile
4f38c610c3
Uninstall hypothesis in regen tox env
2019-01-06 07:53:39 -08:00
Bruno Oliveira
38adb23bd2
Merge pull request #4600 from nicoddemus/release-4.1.0
...
Release 4.1.0
2019-01-06 13:09:11 -02:00
Bruno Oliveira
e24031fb36
Regendocs again, without hypothesis
2019-01-05 20:42:44 +00:00
Bruno Oliveira
99ef8c6d16
Fix typo in Makefile: PYTEST_ADDOPT -> PYTEST_ADDOPTS
2019-01-05 20:31:01 +00:00
Bruno Oliveira
e8152207c4
Merge pull request #4601 from Stranger6667/fix-typo
...
Fix typo in the Changelog for `get_closest_marker`
2019-01-05 18:25:50 -02:00
Bruno Oliveira
d7465895d0
Regendoc again
2019-01-05 19:19:40 +00:00
dmitry.dygalo
5d0bcb4419
Fix typo in the Changelog for get_closest_marker
2019-01-05 20:08:09 +01:00
Bruno Oliveira
01151ff566
Add example for -ra usage to the docs
2019-01-05 16:53:12 -02:00
Bruno Oliveira
d0e9b4812f
Regendocs
2019-01-05 16:38:59 -02:00
Bruno Oliveira
5a8e674e92
Add dataclasses as a regendoc dependency
2019-01-05 16:38:59 -02:00
Bruno Oliveira
e380d4306b
Anonimize attrs links
2019-01-05 16:38:59 -02:00
Bruno Oliveira
9d297c06e8
Preparing release version 4.1.0
2019-01-05 16:38:59 -02:00
Anthony Sottile
e24fdb138d
Merge pull request #4598 from nicoddemus/license-year
...
Update copyright year
2019-01-05 09:09:55 -08:00
Bruno Oliveira
0da5531c7c
Merge pull request #4599 from s0undt3ch/feature/skiporfail-reason
...
Custom reason support for "importorskip"
2019-01-05 13:15:17 -02:00
Bruno Oliveira
0c4898670c
Add changelog entry and update docs for importorskip
2019-01-05 12:55:39 -02:00
Pedro Algarvio
be7eb22e88
Add test case for importorskip custom reason
2019-01-04 19:06:23 +00:00
Pedro Algarvio
8b48621687
Allow providing a custom reason for importorskip
2019-01-04 18:05:28 +00:00
Anthony Sottile
56aecfc081
Merge pull request #4587 from nicoddemus/merge-master-into-features
...
Merge master into features
2019-01-04 09:57:08 -08:00
Anthony Sottile
82a0308bc6
Merge pull request #4595 from auscompgeek/patch-1
...
Fix PEP 565 typo in warnings.rst
2019-01-04 09:56:23 -08:00
Bruno Oliveira
7f671586b0
Update copyright year
2019-01-04 10:37:07 -02:00
David Vo
9e62f9d64e
Fix PEP 565 typo in warnings.rst
2019-01-04 11:50:36 +11:00
Bruno Oliveira
81c2780d2b
Move Node.get_marker and markname deprecations next to the other 4.0 ones
2019-01-02 19:37:17 -02:00
Bruno Oliveira
b39b69a730
Use sphinx-removed-in extension in the documentation
...
Fix #4568
2019-01-02 19:34:46 -02:00
Bruno Oliveira
30c7a7bd69
Merge remote-tracking branch 'upstream/master' into features
2019-01-02 19:16:18 -02:00
Bruno Oliveira
cf5a9aebb2
Merge pull request #4580 from adamchainz/improve_detailed_summary_report_docs
...
Improve detailed summary report docs
2019-01-01 16:28:27 -02:00
Bruno Oliveira
1a9979a803
Merge pull request #4582 from jeffreyrack/4371-display-test-descriptions
...
4371: Update --collect-only to display test descriptions when ran in verbose
2018-12-30 13:56:30 -02:00
Jeffrey Rackauckas
1eef53b6fe
Update --collect-only to display test descriptions when ran in verbose mode.
2018-12-29 22:46:46 -08:00
Adam Johnson
388aff16c8
Improve detailed summary report docs
...
The existing examples had 0 tests collected so didn't show the actual summary report. Also I added a section explaining the difference between `p` and `P`.
2018-12-29 11:47:39 +00:00
wim glenn
83ec0228d1
Merge pull request #4577 from pytest-dev/asottile-patch-1
...
Remove out of date dependencies list in docs
2018-12-27 00:02:42 -06:00
Anthony Sottile
2dc8cc1e48
Remove out of date dependencies list in docs
...
Was scrolling through the docs and noticed this, I figure it's easier to remove this than try and keep it in sync with setup.py
2018-12-25 20:46:48 -05:00
Anthony Sottile
658fa35642
Merge pull request #4572 from bowlofeggs/rm-comma
...
Remove an extraneous comma from the docs.
2018-12-22 23:13:45 -05:00
Randy Barlow
b2c4ed9a2b
Remove an extraneous comma from the docs.
...
Signed-off-by: Randy Barlow <randy@electronsweatshop.com >
2018-12-21 17:53:28 -05:00
Bruno Oliveira
b5cd43bc95
Merge pull request #4558 from hyunchel/fix-incorrect-example-in-cache-doc
...
Update cache doc with correct example
2018-12-21 14:33:41 -02:00
Bruno Oliveira
134ace98d9
Merge pull request #4564 from RonnyPfannschmidt/remove-markinfo
...
Remove MarkInfo
2018-12-21 14:32:15 -02:00
Ronny Pfannschmidt
134641fcb5
add first set of changelog entries for marker removal
2018-12-21 14:02:38 +01:00
Ronny Pfannschmidt
8f8d3114dd
apply suggested enhancements in deprecations.rst
2018-12-21 14:02:38 +01:00
Ronny Pfannschmidt
102ffc69e8
add issue references to the todos
2018-12-21 14:02:38 +01:00
Ronny Pfannschmidt
64a353f2b6
update deprecation docs
2018-12-21 14:02:38 +01:00
Ronny Pfannschmidt
b258764ffe
fix docs
2018-12-21 14:02:38 +01:00
Ronny Pfannschmidt
3947b859dc
fix hookspec parsing
2018-12-21 14:02:38 +01:00
Ronny Pfannschmidt
9f9f6ee48b
remove most of markertransfer
...
keywords are still a big issue
2018-12-21 14:02:38 +01:00
Bruno Oliveira
58fc918d0a
Merge pull request #4571 from nicoddemus/remove-parametrize-marks
...
Remove support for applying marks to values in parametrize
2018-12-21 08:24:47 -02:00
Hyunchel Kim
ece01b0f56
Update cache documentation example to correctly show cache hit and miss
2018-12-21 04:43:26 +00:00
Bruno Oliveira
c378cb4793
Remove support for applying marks to values in parametrize
...
Fix #3082
2018-12-20 16:16:13 -02:00
Ronny Pfannschmidt
d888d5c933
Merge pull request #4565 from nicoddemus/flaky-test
...
Use mocking to make test_junit_duration_report deterministic
2018-12-20 08:52:34 +01:00
Ronny Pfannschmidt
b2d3ae257a
Merge pull request #4566 from nicoddemus/remove-setup-cfg-non-top-level-pytest-plugins
...
Remove support for [pytest] in setup.cfg files and pytest_plugins in non-top-level conftests
2018-12-20 08:47:25 +01:00
Bruno Oliveira
a93f41233a
Raise an error if pytest_plugins is defined in a non-top-level conftest.py file
...
Fix #4548
2018-12-19 18:09:47 -02:00
Bruno Oliveira
9138419379
Remove support for '[pytest]' section in setup.cfg file
...
Fix #3086
2018-12-19 17:43:17 -02:00
Bruno Oliveira
197fd69ddc
Use mocking to make test_junit_duration_report deterministic
...
Fix #4563
2018-12-19 17:13:12 -02:00
Bruno Oliveira
c400d8b2d8
Merge pull request #4561 from nicoddemus/remove-calling-fixtures-directly
...
Calling fixtures directly is now an error instead of a warning
2018-12-19 11:37:14 -02:00
Bruno Oliveira
0115766df3
Calling fixtures directly is now an error instead of a warning
...
Fix #4545
2018-12-19 09:26:29 -02:00
Bruno Oliveira
8563364d8b
Merge pull request #4542 from nicoddemus/remove-legacy-warn
...
Remove config.warn, Node.warn and pytest_logwarning
2018-12-18 19:11:36 -02:00
Bruno Oliveira
0a40ae4c6a
Merge pull request #4557 from Kanguros/master
...
Updating markers example to newest pytest version
2018-12-17 12:45:27 -02:00
Ronny Pfannschmidt
e63c7a13ff
Merge pull request #4327 from ndevenish/approx
...
Let approx() work on more generic sequences
2018-12-17 15:21:12 +01:00
Bruno Oliveira
b7e8171cf8
Merge branch 'features' into remove-legacy-warn
2018-12-17 10:37:31 -02:00
Bruno Oliveira
75e93e5168
Merge pull request #4556 from nicoddemus/idfunc-failure
...
Errors in parametrize id functions now propagate the error instead of issuing a warning
2018-12-17 10:36:15 -02:00
Bruno Oliveira
843d00c219
Fix linting
2018-12-17 10:35:17 -02:00
Bruno Oliveira
c6d27d8224
Merge pull request #4555 from nicoddemus/remove-record-xml-pytest-main-str
...
Remove record_xml_property and support for strings in pytest.main()
2018-12-17 10:08:51 -02:00
Bruno Oliveira
84390acccc
Merge pull request #4553 from nicoddemus/junit-durations
...
Rename "junit_time" to "junit_duration_report" option
2018-12-17 10:08:20 -02:00
Kanguros
f04d3c8b7d
Adding change log entry
2018-12-16 21:27:59 +01:00
Kanguros
60773e0a97
Updating markers example to newest pytest version
2018-12-16 21:13:14 +01:00
Daniel Hahler
3cf44b3037
Merge pull request #4554 from blueyed/merge-master
...
Merge master into features
2018-12-15 02:44:38 +01:00
Bruno Oliveira
1499778d5e
Errors in parametrize id functions now propagate the error instead of issuing a warning
...
Fix #2169
2018-12-14 21:07:54 -02:00
Bruno Oliveira
a7e401656e
Remove support to pass strings to pytest.main()
...
Fix #3085
2018-12-14 15:45:47 -02:00
Bruno Oliveira
6e1b1abfa7
Remove deprecated record_xml_property
...
Fix #4547
2018-12-14 15:10:08 -02:00
Daniel Hahler
8e287c5c77
Merge master into features
2018-12-14 16:44:43 +01:00
Bruno Oliveira
231863b133
Rename "junit_time" to "junit_duration_report" option
...
Just realized while reading the changelog that "junit_time" is not a very good
name, so I decided to open this PR renaming it to "junit_duration_report" which
I believe conveys the meaning of the option better
2018-12-14 12:56:26 -02:00
Bruno Oliveira
ae5d5b8f59
Merge pull request #4552 from nicoddemus/review-changelog-entries
...
Review changelog entries for features branch
2018-12-14 12:52:55 -02:00
Bruno Oliveira
fd48cd57f9
Remove config.warn, Node.warn; pytest_logwarning issues a warning when implemented
...
Fix #3078
2018-12-14 12:50:18 -02:00
Bruno Oliveira
98987177a0
Review changelog entries for features branch
...
I used `towncrier --draft` to see the full changelog, and decided to "nitpick" it
so it reads better as a whole.
2018-12-14 11:17:24 -02:00
Bruno Oliveira
437f44a1f4
Merge pull request #4544 from nicoddemus/remove-pytest-funcarg-prefix
...
Remove pytest_funcarg__ prefix support for defining fixtures
2018-12-14 08:36:09 -02:00
Bruno Oliveira
b76104e722
Merge pull request #4550 from nicoddemus/release-4.0.2
...
Release version 4.0.2
2018-12-14 08:28:18 -02:00
Bruno Oliveira
1e80a9cb34
Remove pytest_funcarg__ prefix support for defining fixtures
...
Fix #4543
2018-12-13 21:41:38 -02:00
Bruno Oliveira
26d202a7bd
Merge pull request #4529 from aparamon/jxmlunit-call-time
...
Add --junittime=call option
2018-12-13 13:51:06 -02:00
Bruno Oliveira
b390c66dc4
Merge pull request #4292 from blueyed/exit-outcome
...
Derive outcomes.exit.Exit from SystemExit instead of KeyboardInterrupt
2018-12-13 13:43:39 -02:00
Bruno Oliveira
f96e1b6f3e
Merge pull request #4532 from nicoddemus/failure-summary
...
Change -ra to show errors and failures last, instead of first
2018-12-13 10:30:28 -02:00
Bruno Oliveira
15b0a89fb1
Merge pull request #4539 from nicoddemus/deprecate-pytest-raises-message
...
Deprecate the 'message' parameter of pytest.raises
2018-12-13 06:00:59 -02:00
Bruno Oliveira
5b83417afc
Deprecate the 'message' parameter of pytest.raises
...
Fix #3974
2018-12-12 22:26:30 -02:00
Daniel Hahler
9b3be870dc
Improve comment
2018-12-12 23:29:43 +01:00
Daniel Hahler
7a600ea3eb
Improve changelog
2018-12-12 23:28:47 +01:00
Bruno Oliveira
110fe2473f
Merge pull request #4531 from nicoddemus/remove-custom-collection-types
...
Remove PyCollector.makeitem
2018-12-12 18:27:50 -02:00
Christopher Dignam
f8d31d2400
Bugfix: monkeypatch.delattr handles class descriptors
...
Correct monkeypatch.delattr to match the correct behavior of
monkeypatch.setattr when changing class descriptors
2018-12-12 15:20:24 -05:00
Bruno Oliveira
e3d30f8ebf
Remove deprecated PyCollector.makeitem
...
Fix #4535
2018-12-12 14:15:52 -02:00
Andrey Paramonov
5d79baf3f8
Fix flaky test attempt 2
2018-12-12 15:33:29 +03:00
Andrey Paramonov
ec4507d12a
Fix doc formatting
2018-12-12 14:33:02 +03:00
Andrey Paramonov
b1e766c30e
Update docs
2018-12-12 13:27:44 +03:00
Andrey Paramonov
316cca204f
Switch to ini config parameter
2018-12-12 13:19:39 +03:00
Andrey Paramonov
0bccfc44a7
Fix flaky test
2018-12-12 12:14:14 +03:00
Bruno Oliveira
3cd11617ea
Add CHANGELOG
2018-12-11 20:40:06 -02:00
Bruno Oliveira
9839ceffe0
Change -ra to show errors and failures last, instead of first
...
Often in large test suites (like pytest's), the -ra summary is very useful
to obtain a list of failures so we can execute each test at once to fix them.
Problem is the default shows errors and failures first, which leads to a lot
of scrolling to get to them.
2018-12-11 20:36:57 -02:00
Bruno Oliveira
a44776ed48
Fix linting
2018-12-11 15:16:11 -02:00
Andrey Paramonov
cfbd387a5d
Add --junittime=call option
2018-12-11 19:29:31 +03:00
Daniel Hahler
bb363c8ff2
Merge pull request #4528 from blueyed/parser-prog
...
argparsing: Parser: allow to forward prog to argparse
2018-12-11 13:33:40 +01:00
Daniel Hahler
ebe0a88226
Merge pull request #4522 from blueyed/p-no-space
...
Handle missing space with -p
2018-12-11 13:33:18 +01:00
Daniel Hahler
3445eae737
argparsing: Parser: allow to forward prog to argparse
...
Ref: https://github.com/pytest-dev/pytest-xdist/pull/388 .
2018-12-11 06:22:35 +01:00
Daniel Hahler
8152b6837e
Merge pull request #4419 from blueyed/set_trace-kwargs
...
pdb: support kwargs with `pdb.set_trace`
2018-12-11 04:28:24 +01:00
Daniel Hahler
0e4e8e00a9
Merge pull request #4504 from feuillemorte/4278_add_cachedir_tag
...
#4278 Added a CACHEDIR.TAG file to the cache directory
2018-12-11 04:27:35 +01:00
Daniel Hahler
7b1cb885c7
Handle missing space with -p
...
This still does not use an actual argument parser, which only gets
instantiated below, and it does not appear to make sense instantiating
it just for this pre-parsing it seems.
`-p` without the required value is being handled before already though,
so it could potentially be passed down from somewhere already?!
Fixes https://github.com/pytest-dev/pytest/issues/3532 .
2018-12-11 04:27:03 +01:00
Daniel Hahler
fc4aa27cae
Derive outcomes.exit.Exception from SystemExit instead of KeyboardInterrupt
...
This is required for properly getting out of pdb, where
KeyboardInterrupt is caught in py36 at least.
Ref: https://github.com/pytest-dev/pytest/issues/1865#issuecomment-242599949
2018-12-11 04:22:33 +01:00
Daniel Hahler
038f1f94c2
Merge pull request #4524 from blueyed/merge-master
...
Merge master into features
2018-12-10 10:17:23 +01:00
Daniel Hahler
539d3dc34d
Merge branch 'fix-test_raises_exception_looks_iterable' into merge-master
2018-12-10 06:30:36 +01:00
Daniel Hahler
0db5ccb0dd
Merge master into features
2018-12-10 05:42:07 +01:00
Bruno Oliveira
76884c73bf
Merge pull request #4146 from Tadaboody/give_hints_when_an_assertion_value_is_None_instead_of_a_boolean_3191
...
[#3191 ] Give hints when an assertion value is None instead of a boolean
2018-12-05 20:04:52 -02:00
Daniel Hahler
5ebacc49c6
Harden tests, fix doc/msg
2018-12-05 19:22:44 +01:00
Daniel Hahler
8a0ed7e2b3
Revisit changelog entry [ci skip]
2018-12-05 19:14:41 +01:00
Daniel Hahler
62b8f2f731
Update changelog [ci skip]
2018-12-05 19:07:10 +01:00
Tomer Keren
8fd60483ef
Don't insert warnings when not in a module
2018-12-05 19:49:54 +02:00
Tomer Keren
7a7ad0c120
Shorten docstring for warn_about_none_ast
2018-12-05 17:47:34 +02:00
Tomer Keren
41031fce2f
Address code review
2018-12-05 17:18:57 +02:00
Tomer Keren
e1e4b226c6
👌 Address code review
...
Edited the changelog for extra clarity, and to fire off auto-formatting
Oddly enough, keeping `filename='{filename!r}'` caused an error while
collecting tests, but getting rid of the single ticks fixed it
Hopefully closes #3191
2018-12-05 10:52:12 +02:00
Bruno Oliveira
26d27df6fc
Improve changelog message
2018-12-05 10:41:30 +02:00
Tomer Keren
3e6f1fa2db
Simplify warning creation by using ast.parse
...
in py2 it's a ast.Name where in py3 it's a ast.NamedConstant
Fixes namespace by using import from
2018-12-05 10:42:05 +02:00
Tomer Keren
aaf7f7fcca
Update changelog
2018-12-05 10:41:30 +02:00
Tomer Keren
e0c2ab1901
Fix tests not to assert a function that already asserts
...
Maybe there should be a warning about that too?
2018-12-05 10:41:30 +02:00
Tomer Keren
59a11b6a5d
Check for 'assert None' and warn appropriately
...
:bug:Fix warn ast bugs
:bug:Fix inner-ast imports by using importFrom
Alternetavly ast_call_helper could be retooled to use ast.attribute(...)
2018-12-05 10:41:42 +02:00
Tomer Keren
9fc9b2926f
Fix tests and add aditional cases
...
As requested by review.
👌 Address code review for tests
2018-12-05 10:41:30 +02:00
Tomer Keren
1654b77ca0
[ #3191 ] Set up tests to confirm warnings
2018-12-05 10:41:18 +02:00
feuillemorte
d237197de3
#4278 Added a CACHEDIR.TAG file to the cache directory
2018-12-04 13:49:08 +01:00
Anthony Sottile
5db46d2087
Merge pull request #4498 from asottile/deprecate_pytest_config
...
Deprecate pytest.config
2018-12-03 11:10:15 -08:00
Anthony Sottile
b88c3f8f82
Deprecate pytest.config
2018-12-03 09:01:42 -08:00
Anthony Sottile
4a3c8e22d7
Merge pull request #4491 from nicoddemus/removal-links
...
Add links to the deprecations docs for the "removal" changelog entries
2018-12-01 21:05:32 -08:00
Bruno Oliveira
a131f0acf6
Merge pull request #4490 from nicoddemus/remove-cached-setup-add-call
...
Remove cached_setup and Metafunc.addcall
2018-12-01 18:44:51 -02:00
Bruno Oliveira
4ffa13728d
Add links to the deprecations docs for the "removal" changelog entries
2018-12-01 17:33:48 -02:00
Bruno Oliveira
44b74c8c25
Merge pull request #4447 from nicoddemus/remove-result-log
...
Change resultlog deprecation to PytestDeprecatedWarning
2018-12-01 17:26:17 -02:00
Bruno Oliveira
40b85d7ee8
Remove Metafunc.addcall
...
Fix #3083
2018-12-01 16:41:59 -02:00
Bruno Oliveira
090f7ff449
Remove request.cached_setup
...
Fix #4489
2018-12-01 15:59:44 -02:00
Bruno Oliveira
b05061dcd2
Change deprecation type of --result-log to PytestDeprecationWarning
...
It was decided to deprecate this on a later date (see discussion in #4447 )
2018-12-01 14:29:50 -02:00
Bruno Oliveira
06dc6e3490
Merge pull request #4446 from nicoddemus/update-deprecations-docs
...
Update deprecations.rst now that we have removed a few features
2018-12-01 14:22:19 -02:00
Bruno Oliveira
63f38de38e
Merge remote-tracking branch 'upstream/features' into update-deprecations-docs
2018-12-01 14:16:20 -02:00
Bruno Oliveira
e0ba1cbf8d
Merge pull request #4299 from RonnyPfannschmidt/callinfo-sanity
...
refactor callinfo to simplify ctor magic
2018-11-30 14:07:40 -02:00
Ronny Pfannschmidt
847eacea19
refactor CallInfo constructor magic into named constructor
2018-11-30 13:21:54 +01:00
Ronny Pfannschmidt
b531f7d585
Merge pull request #3898 from RonnyPfannschmidt/remove-yield-and-compatprop
...
Remove yield and compatprop
2018-11-30 13:19:23 +01:00
Ronny Pfannschmidt
7eb28f9eb7
remove yield tests and compat properties
2018-11-30 10:40:13 +01:00
Anthony Sottile
1d86247b2c
Merge pull request #4443 from asottile/deprecate_raises_exec
...
Deprecate `raises(..., 'code(as_a_string)')` / `warns(..., 'code(as_a_string)')`.
2018-11-29 11:57:56 -08:00
Anthony Sottile
1bba0a9714
Deprecate raises(..., 'code(as_a_string)') / `warns(..., 'code(as_a_string)')
2018-11-29 09:34:51 -08:00
Bruno Oliveira
5cf69fae7d
Merge pull request #4466 from nicoddemus/merge-master-into-features
...
Merge master into features
2018-11-27 05:37:15 -02:00
Bruno Oliveira
b73e083d9d
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-11-26 12:55:05 -02:00
Anthony Sottile
7d3ca68be6
Merge pull request #4464 from asottile/dash_q_escaped
...
Display actual test ids in `--collect-only`
2018-11-25 11:30:26 -08:00
Anthony Sottile
e9b2475e29
Display actual test ids in --collect-only
2018-11-25 09:33:18 -08:00
Ronny Pfannschmidt
59f65230b5
Merge pull request #4454 from nicoddemus/merge-master-into-features
...
Merge master into features
2018-11-24 16:34:20 +01:00
Daniel Hahler
5bee396e4b
Merge master into merge-master-into-features
2018-11-24 13:47:10 +01:00
Bruno Oliveira
33b877cc01
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-11-23 23:27:41 -02:00
Bruno Oliveira
63f90a2bcd
Merge pull request #4438 from RonnyPfannschmidt/fix-4386-raises-partial-object
...
fix #4386 - restructure construction and partial state of ExceptionInfo
2018-11-23 12:41:14 -02:00
Bruno Oliveira
f987b368e8
Merge pull request #3776 from alysivji/attrs-n-dataclasses
...
Detailed assert failure introspection for attrs and dataclasses objects
2018-11-22 21:25:35 -02:00
Bruno Oliveira
5d2e2377ff
Update deprecations.rst now that we have removed a few features
...
* yield tests
* compat properties
* pytest_namespace
All merciless cut down by Ronny :'(
2018-11-22 20:38:47 -02:00
Bruno Oliveira
2eaf3db6ae
Fix docstring indentation (docs env)
2018-11-22 20:21:22 -02:00
Ronny Pfannschmidt
88bf01a31e
fix #4386 - restructure construction and partial state of ExceptionInfo
2018-11-22 21:20:32 +01:00
Ronny Pfannschmidt
d894bf4535
Merge pull request #4407 from blueyed/sys-dunder
...
capture: do not overwrite `sys.__stdin__` etc
2018-11-22 07:26:06 +01:00
Daniel Hahler
9ed63c607e
capture: do not overwrite sys.__stdin__ etc
...
Ref: https://github.com/pytest-dev/pytest/pull/4398#discussion_r234333053
2018-11-20 16:50:15 +01:00
Bruno Oliveira
d52ea4b6cf
Use python 3 in 'doctesting' environment
...
We some examples now use type annotations
2018-11-19 20:06:06 -02:00
Ronny Pfannschmidt
0ffb8ddd7f
Merge pull request #4418 from asottile/printable_ids
...
Ensure that node ids are printable
2018-11-19 21:40:07 +01:00
Anthony Sottile
95c6d591f7
Properly escape \r \n \t bytes
2018-11-19 11:03:52 -08:00
Anthony Sottile
9a1e518cc3
Add changelog entry for printable node ids
2018-11-19 11:03:52 -08:00
Anthony Sottile
9ca0ab6e2b
Ensure printable manually-specified param(id=...)
2018-11-19 11:03:52 -08:00
Anthony Sottile
8395b9e25d
Require id=... to be a string
...
This was documented before, but never enforced. Passing non-strings could
have strange side-effects and enforcing a string simplifies other
implementation.
2018-11-19 11:03:52 -08:00
Anthony Sottile
3d92d5a659
Make sure parametrize ids are printable
2018-11-19 11:03:52 -08:00
Anthony Sottile
50e3783f07
Merge pull request #4421 from RonnyPfannschmidt/remove-pytest-namespace
...
remove pytest namespace hook
2018-11-19 09:35:33 -08:00
Daniel Hahler
6e85febf20
Merge pull request #4420 from blueyed/merge-master
...
Merge master into features
2018-11-19 14:53:01 +01:00
Ronny Pfannschmidt
ba17363d75
remove pytest namespace hook
2018-11-19 14:04:41 +01:00
Daniel Hahler
92a2884b09
pdb: support kwargs with pdb.set_trace
...
This handles `header` similar to Python 3.7 does it, and forwards any
other keyword arguments to the Pdb constructor.
This allows for `__import__("pdb").set_trace(skip=["foo.*"])`.
Fixes https://github.com/pytest-dev/pytest/issues/4416 .
2018-11-19 13:04:14 +01:00
Daniel Hahler
2754a13f86
Merge master into features
2018-11-19 12:55:29 +01:00
Nicholas Devenish
4eddf634e7
Rename and split out the testing, and reword the changelog.
2018-11-18 20:01:11 +00:00
Nicholas Devenish
1a8d9bf254
Let approx() work on more generic sequences
...
approx() was updated in 9f3122fe to work better with numpy arrays,
however at the same time the requirements were tightened from
requiring an Iterable to requiring a Sequence - the former being
tested only on interface, while the latter requires subclassing or
registration with the abc.
Since the ApproxSequence only used __iter__ and __len__ this commit
reduces the requirement to only what's used, and allows unregistered
Sequence-like containers to be used.
Since numpy arrays qualify for the new criteria, reorder the checks so
that generic sequences are checked for after numpy arrays.
2018-11-18 20:01:11 +00:00
Daniel Hahler
62967b3110
Merge pull request #4367 from blueyed/determine_setup
...
Optimize/revisit determine_setup
2018-11-18 12:52:07 +01:00
Ronny Pfannschmidt
5872e1c35a
Merge pull request #4392 from nicoddemus/merge-master-into-features
...
Merge master into features
2018-11-15 06:59:42 +01:00
Daniel Hahler
ba457f5feb
Optimize/revisit determine_setup
2018-11-13 20:14:24 +01:00
Daniel Hahler
ed91d5f086
config: set invocation_dir in the constructor already
...
This allows to make use of it when determining the rootdir etc.
2018-11-13 20:14:24 +01:00
Aly Sivji
b83e97802e
improve failure output
2018-11-13 09:37:02 -06:00
Aly Sivji
2bffd6829e
Move dataclass tests for 3.7 to separate file
2018-11-12 15:36:16 -06:00
Aly Sivji
4e99c80425
have tests pass in python37; move to separate file
2018-11-12 11:24:15 -06:00
Aly Sivji
a663f60b05
cr 2/n -- refactor compare eq class
2018-11-12 09:28:47 -06:00
Aly Sivji
e1e81e315e
code review 1/n -- change hasattr to getattr
2018-11-12 09:28:47 -06:00
Aly Sivji
025d160dfc
Update tests to pass in py27
2018-11-12 09:28:47 -06:00
Aly Sivji
a3e388a73a
Improve changelog
2018-11-12 09:28:47 -06:00
Aly Sivji
1847cc7420
adding docs and cleaning up
2018-11-12 09:28:47 -06:00
Aly Sivji
87b019d5f9
fix gitignore
2018-11-12 09:28:47 -06:00
Aly Sivji
1184db8273
cleaning up
2018-11-12 09:28:47 -06:00
Aly Sivji
a0ba881c22
Add change to log; name to AUTHORS
2018-11-12 09:28:47 -06:00
Aly Sivji
d42f1e87c3
Add tests for attrs and dataclasses
2018-11-12 09:28:47 -06:00
Aly Sivji
9769bc05c6
moving plugin inside pytest first pass
2018-11-12 09:20:56 -06:00