Bruno Oliveira
b7e8171cf8
Merge branch 'features' into remove-legacy-warn
2018-12-17 10:37:31 -02:00
Daniel Hahler
8e287c5c77
Merge master into features
2018-12-14 16:44:43 +01: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
Daniel Hahler
6af674a3ac
Merge pull request #4520 from blueyed/PYTEST_DISABLE_PLUGIN_AUTOLOAD-del
...
tests: fix tests that require PYTEST_DISABLE_PLUGIN_AUTOLOAD to be unset
2018-12-12 18:40:46 +01:00
Daniel Hahler
0db5ccb0dd
Merge master into features
2018-12-10 05:42:07 +01:00
Daniel Hahler
f3babf13ea
Ensure that PYTEST_ADDOPTS are valid by themselves
...
Fixes https://github.com/pytest-dev/pytest/issues/4265 .
2018-12-09 21:57:10 +01:00
Daniel Hahler
64ee1ee81b
tests: fix tests that require PYTEST_DISABLE_PLUGIN_AUTOLOAD to be unset
...
Fix pytest's own tests with PYTEST_DISABLE_PLUGIN_AUTOLOAD=1.
2018-12-09 12:06:18 +01: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
dc20dedbc7
Change RemovedInPytest4Warnings to errors by default
...
To keep existing tests which emit RemovedInPytest4Warnings running, decided
to go with a command line option because:
* Is harder to integrate an ini option with tests which already use an ini file
* It also marks tests which need to be removed/updated in 4.1, when
RemovedInPytest4Warning and related functionality are removed.
Fix #3737
2018-11-12 16:10:57 -02:00
Daniel Hahler
4a74d455de
minor: typos
2018-11-09 02:03:44 +01:00
Anthony Sottile
2368fbb63c
Apply reorder-python-imports to all files
2018-10-25 00:01:29 -07:00
Bruno Oliveira
b7560a8808
Keep backward compatibility for code as kw in Node.warn
2018-09-04 16:48:21 -03:00
Bruno Oliveira
47bf58d69e
Make Node.warn support two forms, new and deprecated
...
As suggested during review, it now accepts two forms:
Node.warn(warning_instance) (recommended)
Node.warn(code, message) (deprecated)
2018-09-04 15:53:17 -03:00
Bruno Oliveira
78ac7d99f5
Deprecate Config.warn and Node.warn, replaced by standard warnings
2018-09-04 11:35:34 -03:00
Bruno Oliveira
2f2d5861bb
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-08-26 16:45:00 -03:00
Anthony Sottile
85482d575e
Replace Source with dedent where possible
2018-08-23 09:06:17 -07:00
Bruno Oliveira
c64a8c9c7f
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-08-18 15:54:53 -03:00
Virgil Dupras
126896f69d
Add option to disable plugin auto-loading
...
If `PYTEST_DISABLE_PLUGIN_AUTOLOAD` is set, disable auto-loading of
plugins through setuptools entrypoints. Only plugins that have been
explicitly specified are loaded.
ref #3784 .
2018-08-07 13:16:28 -04:00
Bruno Oliveira
2c0d2eef40
Only consider actual functions when considering hooks
...
Fix #3775
2018-08-04 16:37:07 -03:00
Anthony Sottile
cbaa7dd56a
Upgrade pre-commit hooks except pyupgrade
2018-06-26 06:35:27 -07:00
Ronny Pfannschmidt
464117b472
fix imports in tests
2018-06-05 10:20:36 +02:00
Ronny Pfannschmidt
703e4b11ba
run black
2018-05-23 16:48:46 +02:00
Ronny Pfannschmidt
9aacb4635e
run pyupgrade
2018-05-23 16:45:09 +02:00
feuillemorte
409b919fc0
#3260 Added test
2018-02-27 19:16:45 +03:00
Bruno Oliveira
aff463a3c4
Merge remote-tracking branch 'upstream/master' into features
2018-01-27 12:28:43 -02:00
Bruno Oliveira
3f5e9ea71e
Fix -o behavior to no longer swallow all remaining options
...
The current behavior was too error-prone because a "-o" option would
swallow all the following non-option parameters:
pytest -o foo=bar path/to/test.py
path/to/test.py would be captured by the -o option, and would fail
because "path/to/test.py" is not in the format "key=value".
2018-01-23 21:19:16 -02:00
Bruno Oliveira
8426c57a9e
Ensure changes in the message in the future do not make the test pass by accident
2018-01-23 21:18:59 -02:00
Aron Coyle
203508d9f3
cleanup test cases
2018-01-23 21:18:37 -02:00
Andrew Toolan
2c7f94fdb9
Added basic fix and test
2018-01-23 21:18:10 -02:00
Anthony Sottile
bd1d17e8de
Replace py.std with stdlib imports
2018-01-09 12:44:10 -08:00
Bruno Oliveira
2a75ae46c3
Improve test that blocks setuptools plugins from being loaded
...
Make it a parametrized test to ensure all the mocked mechanisms in
the test actually work as expected when we *do not* use "-p no:"
2017-11-28 21:29:58 -02:00
Roland Puntaier
833f33fa0c
removed comments
2017-11-28 17:38:49 +01:00
Roland Puntaier
6843d45c51
added test for #2920 fix
2017-11-28 17:29:52 +01:00
Bruno Oliveira
983a09a2d4
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2017-11-10 18:33:02 -02:00
Bruno Oliveira
03829fde8a
Fix linting E741: ambiguous variable name
2017-11-04 13:59:10 -02:00
Bruno Oliveira
10a3b9118b
Use a relative cache_dir in test because of how arguments are parsed on Windows
...
We use shlex to parse command-line arguments and PYTEST_ADDOPTS, so passing
a full path with '\' arguments produces incorrect results on Windows
Anyway users are advised to use relative paths for portability
2017-10-11 19:37:17 -03:00
Dirk Thomas
ce8c829945
add test for #2824
2017-10-11 09:41:18 -07:00
hugovk
ef732fc51d
Remove code for unsupported Python versions
2017-10-10 08:54:56 +03:00
Srinivas Reddy Thatiparthy
a0101f024e
remove os.sep as it behaves differently linux and windows.
...
* on linux it is '/'
* on windows it is '\'
2017-08-05 23:21:43 +05:30
Andras Tim
45ac863069
Fixed E401 flake8 errors
...
multiple imports on one line
2017-07-17 01:44:23 +02:00
Andras Tim
7248b759e8
Fixed E303 flake8 errors
...
too many blank lines (3)
2017-07-17 01:44:23 +02:00
Andras Tim
b840622819
Fixed E302 flake8 errors
...
expected 2 blank lines, found 0
2017-07-17 01:44:23 +02:00
Andras Tim
4730c6d99d
Fixed E272 flake8 errors
...
multiple spaces before keyword
2017-07-17 01:44:23 +02:00
Andras Tim
b226454582
Fixed E251 flake8 errors
...
unexpected spaces around keyword / parameter equals
2017-07-17 01:44:22 +02:00
Andras Tim
617e510b6e
Fixed E231 flake8 errors
...
missing whitespace after ‘,’, ‘;’, or ‘:’
2017-07-17 01:44:22 +02:00
Andras Tim
cf97159009
Fixed E128 flake8 errors
...
continuation line under-indented for visual indent
2017-07-17 01:28:16 +02:00
Andras Tim
6af2abdb53
Fixed flake8 warnings
...
W191 indentation contains tabs
W292 no newline at end of file
W293 blank line contains whitespace
W391 blank line at end of file
2017-07-17 01:28:16 +02:00
Bruno Oliveira
fa56114115
Clean up warnings generated by pytest's own suite
2017-03-20 22:13:17 -03:00
Bruno Oliveira
9f85584656
Merge remote-tracking branch 'upstream/features' into integrate-pytest-warnings
2017-03-20 19:59:05 -03:00
Bruno Oliveira
42a5d6bdfa
Add __future__ imports to all pytest modules
...
This prevents silly errors from creeping in Python 2 when testing in Python 3
2017-03-16 22:45:40 -03:00