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