Bruno Oliveira
6f2c0fd2e8
Show a better message when 'request' is used in parametrize
...
Fix #6183
2019-11-13 19:57:10 -03:00
Bruno Oliveira
85288b5321
fix bug with nonskipped first test in package ( #5831 )
...
fix bug with nonskipped first test in package
2019-11-06 16:06:46 -03:00
Florian Bruhin
35800a2f73
Merge pull request #6112 from gaucheph/fix-small-typo
...
typos
2019-11-01 11:18:06 +01:00
Patrick Harmon
abc890079f
typos
2019-10-31 23:19:35 -05:00
David Szotten
285524c6cd
Fix --trace for parametrized tests
...
Without this, the second time it tries to stop in a parametrized
function it raises instead:
`ValueError: --trace can't be used with a fixture named func!`
Implementation idea, test (and changelog tweaks) thanks to blueyed
Co-Authored-By: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
Co-Authored-By: Daniel Hahler <git@thequod.de>
2019-10-31 21:41:33 +00:00
Bruno Oliveira
cefe6bfec3
Replace a few outdated references to py.test with pytest ( #6063 )
...
Replace a few outdated references to py.test with pytest
2019-10-26 12:59:22 -03:00
Ran Benita
0b8c35516f
Replace py.io.TextIO with io.StringIO
...
In Python3, py.io.TextIO is just an alias to io.StringIO. Remove the
indirection.
2019-10-26 16:33:57 +03:00
Ran Benita
96de232791
Replace a few outdated references to py.test with pytest
2019-10-26 16:28:17 +03:00
Bruno Oliveira
ba4b8c869c
Review rm_rf handling of FileNotFoundErrors
2019-10-23 08:30:52 -03:00
Daniel Hahler
82e9013e73
Merge pull request #6004 from blueyed/fix-nf
...
cache: NFPlugin: keep known nodeids
2019-10-23 01:04:48 +02:00
Daniil Galiev
9275012ef7
fix bug with nonskipped first test in package
2019-10-21 00:11:24 +02:00
Daniel Hahler
0123b29ed7
tests: remove unnecessary test, clarify
...
Follow-up to https://github.com/pytest-dev/pytest/pull/6009 .
2019-10-20 20:40:13 +02:00
Bruno Oliveira
16efa1bfef
Merge pull request #6009 from yoavcaspi/fix_keyboardInterrupt_on_setup_show
...
setuponly: remove printing out/err from capman
2019-10-20 14:00:06 -03:00
Yoav Caspi
5624e366c1
add more indications to the result of the tests
2019-10-20 09:54:23 +03:00
Anthony Sottile
3a402811de
Ensure .pytest_cache file has a newline at the end
2019-10-19 14:42:06 -07:00
Yoav Caspi
e05b33ed16
setuponly: remove printing out/err from capman
2019-10-19 22:33:19 +03:00
Daniel Hahler
3173a26388
cache: NFPlugin: keep known nodeids
...
Caveat: does not forget about old nodeids
Fixes https://github.com/pytest-dev/pytest/issues/5206
2019-10-19 04:53:01 +02:00
Daniel Hahler
7ef44913a1
tests: debugging: disable pdb++ within inner tests
...
Ref: https://github.com/pytest-dev/pytest/pull/5306#issuecomment-495690643
2019-10-18 17:08:39 +02:00
Daniel Hahler
90dfee5da5
tests: keep numpy being optional
...
Ref: https://github.com/pytest-dev/pytest/pull/5950#discussion_r335254774
2019-10-16 23:50:23 +02:00
Victor Maryama
63e3d89647
Fixed linting.
2019-10-12 15:08:47 +02:00
Victor Maryama
1f639e2c22
Casting fixture parameter to list at the beginning of parameter parsing.
2019-10-12 14:33:43 +02:00
Anthony Sottile
3fada8c8ee
Merge pull request #5925 from asottile/fix_resource_warning_again_5088
...
Fix spurious ResourceWarning stderr in testsuite again
2019-10-07 16:26:38 -07:00
Anthony Sottile
19eb0590f1
Fix spurious ResourceWarning stderr in testsuite again
2019-10-06 19:11:33 -07:00
Anthony Sottile
eaa05531ed
Add test to ensure _pytest is warning-clean on import
2019-10-06 14:11:08 -07:00
Anthony Sottile
c58b0fb4ac
Use ATTRS_EQ_FIELD for attrs 19.2 compat
2019-10-05 18:16:35 -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
7bdfba3578
Fix --setup-only and --setup-show for custom pytest items
...
Fix #5884
2019-09-28 11:52:09 -03: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
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
Andrzej Klajnert
e2382e96ed
Minor cleanup in tests.
2019-09-19 11:13:22 +02: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
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
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
Hugo
d049b35397
Fix for Python 4: replace unsafe PY3 with PY2
2019-09-05 18:06:47 +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
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
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
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
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
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