bengartner
8e00df4c4b
Add dot prefix if file makefile extension is invalid for pathlib ( #8222 )
2021-01-04 15:58:11 +02:00
Anton
48c9a96a03
Fix failing staticmethod tests if they are inherited ( #8205 )
...
* Fix failing staticmethod tests if they are inherited
* add comments, set default=None
2020-12-30 19:00:37 -08:00
Chris NeJame
534d174fd2
Clarify fixture execution order and provide visual aids ( #7381 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-12-16 13:53:14 -03:00
Shubham Adep
d1cb9de211
Custom multiple marker execution order ( #8065 )
...
* Custom multiple marker execution order
https://github.com/pytest-dev/pytest/issues/8020 issue stated that ordering of multiple custom markers is from inside - out. I have added example for the same in the documentation. Please let me know for further changes / concerns.
* remove trailing spaces
The last commit was failing due to extra spaces
* Ran tox tests locally to debug white space trimming issues
* Resolve: ERROR: docs: commands failed for tox -e docs
* Update doc/en/reference.rst
Committed PR suggestions.
Co-authored-by: Florian Bruhin <me@the-compiler.org>
* Added reference to Node.iter_markers_with_node in documentation
* Add myself to Authors
Co-authored-by: Shubham <shubham.adep@wsu.edu>
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2020-11-30 16:48:08 +01:00
Prakhar Gurunani
3405c7e6a8
Add more info about skipping doctests ( #8080 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-11-28 12:47:02 -03:00
Dominic Mortlock
775ba63c67
Refactor acceptance_test to use pytester ( #8070 )
2020-11-25 14:42:47 +02:00
mickeypash
ce825ed16c
Add small section on migrating from nose to pytest
...
The section currently features the nose2pytest tool with plans to expand
on some of the common gotchas when performing such migrations.
2020-11-19 08:50:11 -03:00
Petter Strandmark
eda681af2b
Call Python 3.8 doClassCleanups ( #8033 )
2020-11-19 12:07:15 +02:00
Garvit Shubham
6a5037a25b
#7942 test_setupplan.py migrate from testdir to Pytester ( #8004 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-11-07 09:29:45 -03:00
duthades
b815f430e5
#7942 test_session.py migrate from testdir to pytester
...
- Add name to AUTHORS
2020-11-04 21:55:07 +05:30
Ran Benita
7fb0ea3f68
Merge pull request #7956 from csernazs/fix-7951
...
Fix handling recursive symlinks
2020-10-31 18:59:50 +02:00
Cserna Zsolt
8a38e7a6e8
Fix handling recursive symlinks
...
When pytest was run on a directory containing a recursive symlink it failed
with ELOOP as the library was not able to determine the type of the
direntry:
src/_pytest/main.py:685: in collect
if not direntry.is_file():
E OSError: [Errno 40] Too many levels of symbolic links: '/home/florian/proj/pytest/tests/recursive'
This is fixed by handling ELOOP and other errors in the visit function in
pathlib.py, so the entries whose is_file() call raises an OSError with the
pre-defined list of error numbers will be exluded from the result.
The _ignore_errors function was copied from Lib/pathlib.py of cpython 3.9.
Fixes #7951
2020-10-31 17:40:56 +01:00
Ran Benita
1c18fb8ccc
Merge pull request #7553 from tirkarthi/namedtuple-diff
...
Add support to display field names in namedtuple diffs.
2020-10-31 15:02:31 +02:00
Karthikeyan Singaravelan
9a0f4e57ee
Add support to display field names in namedtuple diffs.
2020-10-31 14:41:53 +02:00
Ariel Pillemer
a7e38c5c61
pytest-dev#7942 test_runner_xunit.py ( #7964 )
2020-10-31 12:38:11 +02:00
Christine M
8d369f73ba
Migrate test_skipping.py from testdir to pytester ( #7953 )
2020-10-28 17:05:54 +02:00
Prashant Sharma
5182c73fea
Add example for registering multiple custom mark ( #7886 )
2020-10-14 15:17:50 +03:00
Tanvi Mehta
d093931464
Added name to authors list
2020-10-07 22:57:52 -07:00
Jakob van Santen
91fa11bed0
python_api: let approx() take nonnumeric values ( #7710 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-09-28 12:17:23 -03:00
Kamran Ahmad
d3f47bf346
Improved 'Declaring new hooks' section in docs. ( #7782 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-09-23 11:15:55 -03:00
Debi Mishra
25b56e9c69
docs: Add a note about -q option used in getting started guide
2020-07-20 01:28:11 +05:30
Lewis Cowles
71ab6236a1
Clearer guidance on pytest.raise(match=...) failure ( #7499 )
2020-07-15 22:26:47 +03:00
Vlad-Radz
678c1a0745
assertion: improve diff output of recursive dataclass/attrs
...
Co-authored-by: Vlad <uladzislau.radziuk@nordcloud.com>
2020-07-08 19:04:56 +03:00
Ram Rachum
dd446bee5e
Fix exception causes all over the codebase
2020-06-19 22:02:24 +03:00
piotrhm
bde0ebcda9
Replace cleanup_numbered_dir with atexit.register
2020-06-09 11:17:31 -03:00
Bruno Oliveira
fcbaab8b0b
Allow tests to override "global" `log_level` (rebased) ( #7340 )
...
Co-authored-by: Ruaridh Williamson <ruaridh.williamson@flexciton.com>
2020-06-08 22:05:46 -03:00
Prashant Anand
e78207c936
7119: data loss with mistyped --basetemp ( #7170 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-06-08 21:54:22 -03:00
Ronny Pfannschmidt
8faf1e8eca
Merge pull request #7286 from gnikonorov/issue_6856
...
Output a warning to stderr when an invalid key is read from an INI config file
2020-06-02 15:47:02 +02:00
Tor Colvin
fe64093411
Fix removal of very long paths on Windows ( #6755 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-06-02 08:56:33 -03:00
Gleb Nikonorov
9ae94b08e2
Add documentation
2020-05-31 11:58:39 -04:00
Anthony Sottile
c594bbbd19
Merge pull request #7240 from DahlitzFlorian/fix-issue-7233
...
Add note about --strict and --strict-markers to references
2020-05-23 12:31:27 -07:00
Claire Cecil
79701c65ed
Added support for less verbose version information ( #7169 )
2020-05-23 11:27:58 -03:00
Florian Dahlitz
62d3577435
Add note about --strict and --strict-markers to references
2020-05-22 16:33:50 +02:00
mcsitter
fa6a13a7cc
Updated compatible python versions
...
As indicated on pypi and in the README pytest supports python version 3.8 and 3.9. The documentation should match.
2020-05-20 22:41:52 +02:00
Ran Benita
f0f552d60c
Merge pull request #6283 from felixn/master
...
Create LogCaptureHandler if necessary (closes #6240 )
2020-05-15 09:13:57 +03:00
Felix Nieuwenhuizen
4dfc461036
Create LogCaptureHandler if necessary ( closes #6240 )
2020-05-13 20:38:14 +02:00
Pavel Karateev
903e2ab6ee
Fix #7126 - saferepr for bytes params
...
bytes parametrize parameters cause error when --setup-show is used
and Python is called with -bb flag
2020-05-09 13:57:17 +03:00
Keri Volans
678440e46d
7018: Use internal version of make_numbered_dir
2020-05-03 10:45:06 +01:00
Katarzyna Król
7789b51acb
Issue 4677 - always relative path in skip report ( #6953 )
2020-04-17 08:28:36 +03:00
symonk
87edc09dea
Gracefully handle eval() failure(s) for marker expressions
2020-04-13 13:25:06 +01:00
Ronny Pfannschmidt
19c243f0fa
Merge pull request #6285 from earonesty/patch-1
...
Add _pytest.fixtures.FixtureLookupError to top level import
2020-04-10 07:58:58 +02:00
smarie
95fadd5740
Improved time counter used to compute test durations. ( #6939 )
...
Co-authored-by: Sylvain MARIE <sylvain.marie@se.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-03-29 15:20:09 +03:00
earonesty
615474329d
Update AUTHORS
2020-03-03 09:59:38 -03:00
kpinc
eeebcd77dd
doc: add list of fixtures to start of fixture chapter ( #6696 )
...
- Add list of fixtures to start of fixture chapter
- Add "fixture" cross ref type
2020-02-22 14:56:19 +01:00
Nathaniel Compton
7c09d88b72
#6289 : Add new example to XFAIL documentation ( #6685 )
...
Fix #6289
Co-authored-by: Ran Benita <ran234@gmail.com>
2020-02-19 15:04:37 -03:00
Bruno Oliveira
e6ea9edffe
Merge pull request #6673 from sscherfke/features
...
Reverse / fix meaning of "+/-" in error diffs
2020-02-12 15:05:38 -03:00
Stefan Scherfke
d59adc61f9
Reverse / fix meaning of "+/-" in error diffs
...
The convention is "assert result is expected". Pytest's error diffs now
reflect this. "-" means that sth. expected is missing in the result and
"+" means that there are unexpected extras in the result.
Fixes : #3333
2020-02-10 21:12:37 +01:00
Vladyslav Rachek
9e262038c8
[parametrize] enforce explicit argnames declaration ( #6330 )
...
Every argname used in `parametrize` either must
be declared explicitly in the python test function, or via
`indirect` list
Fix #5712
2020-02-06 20:20:25 -03:00
Daniel Hahler
55e5817570
Merge master into features
2020-01-29 03:07:35 +01:00
Holger Kohr
80d4dd6f0b
Replace `==` with `is` for comparison of cache keys
...
Closes #6497
2020-01-28 18:05:53 -03:00