Ronny Pfannschmidt
f743e95cfc
Merge pull request #2791 from OfirOshir/features
...
bugfix for issue #2491
2017-10-25 09:04:01 +02:00
Bruno Oliveira
4e581b637f
Use zip and map from six
2017-10-24 22:13:32 -02:00
Bruno Oliveira
6b86b0dbfe
Fix additional linting issues
2017-10-24 21:01:00 -02:00
Bruno Oliveira
bdab29fa3d
Merge pull request #2867 from Perlence/ini-markers-whitespace
...
Strip whitespace from markers in INI config
2017-10-24 20:11:20 -02:00
Bruno Oliveira
6821d36ca5
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2017-10-24 19:57:14 -02:00
Sviatoslav Abakumov
52aadcd7c1
Strip whitespace from markers in INI config
...
Resolves #2856 .
2017-10-24 14:18:39 +03:00
Tom Dalton
f5e72d2f5f
Unused import / lint
2017-10-24 11:25:42 +01:00
Tom Dalton
a5ac19cc5e
Merge branch 'issue-2836-fixture-collection-bug' of github.com:tom-dalton-fanduel/pytest into issue-2836-fixture-collection-bug
2017-10-24 10:45:06 +01:00
Tom Dalton
14e3a5fcb9
Move the generic separator to a constant
2017-10-24 10:42:16 +01:00
Bruno Oliveira
a3ec3df0c8
Add E722 and E741 flake errors to the ignore list
...
Also fixed 'E704 multiple statements on one line (def)' in python_api
2017-10-23 18:19:15 -02:00
Tom Dalton
655ab0bf8b
Address more review comments, fix massive bug I reintroduced in the node-splitting code :-/
2017-10-23 17:49:49 +01:00
Tom Dalton
a7199fa8ab
Docstring typo
2017-10-23 16:59:56 +01:00
Tom Dalton
d714c196a5
Shorter code, longer docstring
2017-10-23 16:55:35 +01:00
Tom Dalton
ee7e1c94d2
Remove redundant if, tidy if-body
2017-10-23 16:12:07 +01:00
Tom Dalton
1e6dc6f8e5
Working (I think) fix for #2836
2017-10-23 13:26:42 +01:00
Ronny Pfannschmidt
083084fcbc
Merge pull request #2842 from ceridwen/features
...
Use funcsigs and inspect.signature to do function argument analysis
2017-10-20 07:49:08 +02:00
Ceridwen
3da28067f3
Replace introspection in compat.getfuncargnames() with inspect/funcsigs.signature
2017-10-19 16:01:26 -07:00
Ronny Pfannschmidt
3f9f4be070
Merge pull request #2845 from jespino/fix/2832
...
Adding Failed exception to manage maxfail behavior
2017-10-19 09:12:11 +02:00
Bruno Oliveira
537fc3c315
Merge pull request #2824 from dirk-thomas/pytest_addopts_before_initini
...
get PYTEST_ADDOPTS before calling _initini
2017-10-18 18:35:12 -02:00
Matty G
11b391ff49
Update mark.py
2017-10-17 14:11:07 -07:00
Jesús Espino
00d3abe6dc
Adding Failed exception to manage maxfail behavior
2017-10-17 21:32:20 +02:00
je
eaf38c7239
call path.read(), add tests, add news fragment
2017-10-14 00:49:54 +08:00
je
b29a9711c4
ignore valid setup.py during --doctest-modules
2017-10-14 00:49:45 +08:00
Ronny Pfannschmidt
c750a5beec
Merge pull request #2794 from thisch/catchlog
...
Merge pytest-catchlog plugin
2017-10-12 09:02:46 +02:00
Ronny Pfannschmidt
df37cdf51f
Merge pull request #2808 from georgeyk/allow-module-level-skip
...
Allow module level skip
2017-10-12 06:50:53 +02:00
Thomas Hisch
af75ca435b
Fix some coding-style issues in the logging plugin
2017-10-12 02:19:24 +02:00
Thomas Hisch
775f4a6f2f
Fix flake8 issue
2017-10-12 02:19:24 +02:00
Thomas Hisch
0e83511d6d
Rename name of registered logging plugin
2017-10-12 02:19:24 +02:00
Thomas Hisch
1f3ab118fa
Remove usage of get_logger_obj
2017-10-12 02:19:24 +02:00
Thomas Hisch
0ec72d0745
Improve get_option_ini and get_actual_log_level
2017-10-12 02:19:24 +02:00
Dirk Thomas
66e9a79472
get PYTEST_ADDOPTS before calling _initini
2017-10-11 09:38:44 -07:00
hugovk
ef732fc51d
Remove code for unsupported Python versions
2017-10-10 08:54:56 +03:00
Ronny Pfannschmidt
dd45f8ba6c
Merge pull request #2822 from RonnyPfannschmidt/nomore-py26
...
Nomore py26
2017-10-10 07:00:08 +02:00
Ronny Pfannschmidt
c486598440
remove some support code for old python versions
2017-10-09 17:25:13 +02:00
Bruno Oliveira
059455b45d
Merge pull request #2773 from RonnyPfannschmidt/fix-markeval-2767
...
refactor mark evaluators
2017-10-09 12:17:15 -03:00
Ronny Pfannschmidt
9b0ce535c9
Merge pull request #2801 from nicoddemus/capture-fixture
...
Allow fixtures to use capsys and capfd
2017-10-09 15:26:50 +02:00
Leonard Lausen
e89abe6a40
Defensive fallback in case of kwargs not being present
2017-10-09 00:37:27 +09:00
Leonard Lausen
c24ffa3b4c
Fix pytest.parametrize when argnames are specified as kwarg
2017-10-08 12:23:26 +09:00
Ronny Pfannschmidt
459cc40192
skipping: cleanup
...
remove dead comments
fix naming
remove dead code
2017-10-06 10:44:49 +02:00
Ronny Pfannschmidt
e3b73682b2
flake8 fix
2017-10-06 10:44:49 +02:00
Ronny Pfannschmidt
8480075f01
resuffle markevaluator internal structure
2017-10-06 10:44:49 +02:00
Ronny Pfannschmidt
9ad2b75038
skipping: replace _evalskip with a more consistent _skipped_by_mark
2017-10-06 10:44:49 +02:00
Ronny Pfannschmidt
a33650953a
remove unused import
2017-10-06 10:44:49 +02:00
Ronny Pfannschmidt
667e70f555
switch out the placeholder MarkEvaluator in unittest plugin
2017-10-06 10:44:49 +02:00
George Y. Kussumoto
03ce0adb79
Fix: handle CollectReport in folded_skips function
2017-10-04 19:18:55 -03:00
Bruno Oliveira
e7a4d3d8cf
Merge remote-tracking branch 'upstream/master' into features
2017-10-04 17:28:34 -03:00
Bruno Oliveira
df6d5cd4e7
Use ascii_escaped to escape unicode warnings
2017-10-03 12:19:37 -03:00
Bruno Oliveira
fbb9e9328b
Fix warning about non-ascii warnings even when they are ascii
...
Fix #2809
2017-10-03 07:39:53 -03:00
George Y. Kussumoto
c1aa63c0bb
Fix docstring alignment and typos
2017-10-02 21:24:52 -03:00
George Y. Kussumoto
79d3353081
Add allow_module_level kwarg to skip helper
2017-10-02 21:07:21 -03:00
Xuan Luong
7093d8f65e
Add example of -k 'not test' in help text
2017-09-30 18:43:20 -04:00
Bruno Oliveira
f9589f7b64
Resume output capturing after capsys/capfd.disabled() context manager
...
Fix #1993
2017-09-29 17:24:31 -03:00
Christian Boelsen
794d4585d3
Remove unnecessary complexity in _check_initialpaths_for_relpath().
2017-09-28 20:53:50 +01:00
Bruno Oliveira
3b30c93f73
Deprecate TerminalReporter._tw
...
Fix #2803
2017-09-27 17:16:34 -03:00
Bruno Oliveira
22f338d74d
Refactor some names for better understanding and consistency
2017-09-26 20:09:42 -03:00
Bruno Oliveira
9919269ed0
Allow to use capsys and capfd in other fixtures
...
Fix #2709
2017-09-26 20:09:36 -03:00
Thomas Hisch
ad21d5cac4
Remove pytest-capturelog backward compat code
2017-09-26 23:24:27 +02:00
Thomas Hisch
2559ec8bdb
use 'formatter' kwarg of catching_logs
2017-09-22 22:27:50 +02:00
Thomas Hisch
207f153ec1
Remove logging_at_level ctx manager
2017-09-22 22:27:50 +02:00
Thomas Hisch
3a4011585f
catching_logs: Remove usage of 'closing' ctx manager
...
The 'closing' context manager is only needed for the log_file_handler.
2017-09-22 22:27:50 +02:00
Thomas Hisch
57f66a455a
catching_logs: Remove unused 'filter' kwarg
2017-09-22 22:27:50 +02:00
Thomas Hisch
e41fd52e8c
Introduce live_logs context manager
2017-09-22 22:27:50 +02:00
Thomas Hisch
08f6b5f4ea
Use pytest.hookimpl instead of pytest.mark.hookwrapper
...
pytest.mark.hookwrapper seems to be used nowhere in the _pytest package.
2017-09-22 22:27:50 +02:00
Thomas Hisch
d13e17cf51
Don't modify the 'config' object in __init__
2017-09-22 22:27:50 +02:00
Thomas Hisch
f1f6109255
Remove _catchlog_ prefix
2017-09-22 22:27:50 +02:00
Thomas Hisch
87b8dc5afb
Move 'config' handling from pytest_configure to __init__
2017-09-22 22:27:50 +02:00
Thomas Hisch
fc965c1dc5
Remove outdated docstring
2017-09-22 22:27:50 +02:00
Thomas Hisch
a1bd54e4ea
Clean-up LogCaptureHandler
2017-09-22 22:27:50 +02:00
Thomas Hisch
36cceeb10e
Set type of log_print ini-variable to 'bool'
2017-09-22 22:27:50 +02:00
Thomas Hisch
98209e92ee
Remove superfluous whitespace in docstring
2017-09-22 22:27:50 +02:00
Thomas Hisch
1bea7e6985
Cleanup pytest_addoption
2017-09-22 22:27:50 +02:00
Thomas Hisch
6607478b23
Add unittests for LoggingPlugin (excluding perf tests)
2017-09-22 22:27:49 +02:00
Thomas Hisch
8eafbd05ca
Merge the pytest-catchlog plugin
2017-09-22 22:27:49 +02:00
Ofir
062a0e3e68
If an exception happens while loading a plugin, PyTest no longer hides the original traceback.
...
In python2 it will show the original traceback with a new message that explains in which plugin.
In python3 it will show 2 canonized exceptions, the original exception while loading the plugin in addition to an exception that PyTest throws about loading a plugin.
2017-09-19 15:14:08 +03:00
Oliver Bestwalter
2802135741
fix 'DoctestItem' object has no attribute '_fixtureinfo'
...
* doxtests don't seem to have this attribute, so nothing will be written in that case.
* tried to be a good boy scout and tidied up surrounding code a bit (comments, shadowed/unused names, removed random new lines, naming things)
2017-09-19 12:41:12 +02:00
Bruno Oliveira
3ebfb881c9
Merge remote-tracking branch 'upstream/master' into features
2017-09-18 19:10:31 -03:00
Bruno Oliveira
ac5c5cc1ef
Merge pull request #2750 from evanunderscore/fix-filescompleter
...
Fix crash in FastFilesCompleter with no prefix
2017-09-14 20:11:43 -03:00
Christian Boelsen
14b6380e5f
Fix #2775 - running pytest with "--pyargs" will result in Items with empty "parent.nodeid" if run from a different root directory
2017-09-13 17:15:32 +01:00
Xuan Luong
1e93089165
[bugfix] Checking MarkDecorator equality returns False for non-MarkDecorator object
2017-09-09 01:31:08 -04:00
Bruno Oliveira
9273e11f21
Merge branch 'master' into features
2017-09-07 13:59:10 -03:00
Evan
6cf515b164
Fix crash in FastFilesCompleter with no prefix
2017-09-08 00:14:56 +10:00
Ronny Pfannschmidt
6967f3070e
Merge pull request #2711 from massich/mimic_raises_signature_in_warns
...
[MRG][feature] Change warns signature to mimic the raises call
2017-09-07 13:19:09 +02:00
Joan Massich
80d165475b
Add documentation
2017-09-07 10:28:52 +02:00
Joan Massich
aa6a67044f
Add match_regex functionality to warns
2017-09-07 09:58:03 +02:00
Bruno Oliveira
d01f08e96f
Merge branch 'features' into pluggy-master
2017-09-06 13:13:35 -03:00
Ronny Pfannschmidt
ad36407747
Merge pull request #2700 from nicoddemus/staticmethods-fixtures
...
Allow tests declared as @staticmethod to use fixtures
2017-09-06 08:24:00 +02:00
Bruno Oliveira
e1f2254fc2
Merge pull request #2734 from RonnyPfannschmidt/simplify-string-safening
...
simplyfy ascii escaping by using backslashreplace error handling
2017-09-05 21:14:27 -03:00
Bruno Oliveira
f825b4979b
Merge remote-tracking branch 'upstream/master' into features
2017-09-05 19:44:33 -03:00
Bruno Oliveira
1fc185b640
Add comment about possible future refactoring in the fixture mechanism
2017-09-05 19:28:39 -03:00
Tarcisio Fischer
8d1903fed3
Avoid creating arbitrary filenames for tmpdir on Testdir's constructor
...
Fixes #2751
2017-09-05 15:22:04 -03:00
Ronny Pfannschmidt
13eac944ae
restore ascii escaping for python 3.3/3.4
2017-09-04 21:25:46 +02:00
Bruno Oliveira
3dc0da9339
Remove __multicall__ warning and usages in testing
...
pluggy>=0.5 already warns about those
2017-09-01 18:53:06 -03:00
Ronny Pfannschmidt
181bd60bf9
Merge pull request #2742 from nicoddemus/resultlog-deprecation
...
Improve user guidance regarding ``--resultlog`` deprecation
2017-09-01 08:29:41 +02:00
Bruno Oliveira
3288c9a110
Improve user guidance regarding ``--resultlog`` deprecation
...
Fix #2739
2017-08-31 19:11:41 -03:00
Bruno Oliveira
221797c609
Encode utf-8 byte strings in pytester's makefile
...
Fix #2738
2017-08-31 18:49:06 -03:00
Ronny Pfannschmidt
5e00549ecc
Merge pull request #2735 from fgmacedo/fgm-fix-reprfuncargs-toterminal
...
2731.bug Fix ReprFuncArgs with mixed unicode and utf-8 args.
2017-08-31 09:36:56 +02:00
Fernando Macedo
59cdef92be
fixes #2731 ReprFuncArgs with mixed unicode and utf-8 args
2017-08-30 16:06:12 -03:00
Ronny Pfannschmidt
78a027e128
simplyfy ascii escaping by using backslashreplace error handling
2017-08-30 16:43:16 +02:00
Tyler Goodlet
ff35c17ecf
Drop wrapper module; import directly
2017-08-25 11:46:55 -04:00
Tyler Goodlet
9ab83083d1
Update docs
2017-08-24 16:53:37 -04:00
Tyler Goodlet
333a9ad7fa
Stop vendoring pluggy
...
Resolves #2716
2017-08-24 15:54:33 -04:00
Kirill Pinchuk
12b1bff6c5
`compat.safe_getattr` now catches OutcomeExceptions too
2017-08-23 17:17:03 +03:00
Bruno Oliveira
a993add783
Allow tests declared as @staticmethod to use fixtures
...
Fix #2699
2017-08-17 20:44:19 -03:00
Bruno Oliveira
f18780ed8a
Update docs: ``match`` keyword was introduced in 3.1
...
Also update the text to recommend using the context-manager
over the callable/string forms.
2017-08-16 14:28:34 -03:00
Ronny Pfannschmidt
5c0feb2877
Merge pull request #2680 from prokaktus/skipping-same-module
...
Fold skipped tests with global pytestmark variable
2017-08-15 10:52:24 +02:00
prokaktus
98bf5fc9be
Fold skipped tests with global pytestmark variable
2017-08-15 02:18:46 +03:00
Andreas Pelme
39331856ed
Use the correct stacklevel for getfuncargvalue() deprecation warning.
...
Fixed #2681 .
2017-08-13 14:59:33 +02:00
Ronny Pfannschmidt
eb462582af
fix #2675 - store marks correctly in callspecs
2017-08-10 19:46:36 +02:00
Bruno Oliveira
cc0f2473eb
Fix windows console workaround error with non-standard io-streams
...
Fix #2666
2017-08-07 20:57:13 -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
Ronny Pfannschmidt
9e62a31b63
Merge pull request #2650 from srinivasreddy/2642
...
Fixed#2642: Convert py module references to six module
2017-08-04 09:21:51 +02:00
Srinivas Reddy Thatiparthy
dc563e4954
convert py module references to six module
2017-08-04 08:05:03 +05:30
Bruno Oliveira
ad52f714a9
Fix small terminal glitch when collecting a single test item
...
Fix #2579
2017-08-03 20:57:46 -03:00
Bruno Oliveira
7703dc921c
Only skip null bytes before setting the environment variable
...
As discussed, node ids have already been "ascii" sanitized by the
parametrization process
2017-08-02 10:27:45 -03:00
Bruno Oliveira
1deac2e210
Properly escape test names when setting PYTEST_CURRENT_TEST environment variable
...
Fix #2644
2017-08-01 20:52:37 -03:00
Ronny Pfannschmidt
6e7547244b
Merge pull request #2636 from RonnyPfannschmidt/remove-preinit
...
remove preinit, its no longer needed
2017-08-01 05:22:41 +02:00
Bruno Oliveira
8a2e6a8d51
Fix linting
2017-07-31 16:49:30 -03:00
Ronny Pfannschmidt
74d536314f
pytester: make pytest fullpath a constant
2017-07-31 18:18:53 +02:00
Ronny Pfannschmidt
ceb016514b
remove dead code - Node._memoizedcall
2017-07-31 18:18:26 +02:00
Ronny Pfannschmidt
e90f876b34
remove the last own implementation of pytest_namespace
2017-07-31 13:48:25 +02:00
Ronny Pfannschmidt
c68a89b4a7
remove preinit, its no longer needed
2017-07-31 13:44:05 +02:00
Bruno Oliveira
763c580a2a
Merge pull request #2576 from maiksensi/feat/raise-not-implemented-for-lt-gt-in-approx
...
#2003 Change behavior of `approx.py` to only support `__eq__` comparison
2017-07-30 17:48:33 -03:00
Bruno Oliveira
e1aed8cb17
Merge pull request #2490 from RonnyPfannschmidt/fix-580
...
Test Outcomes as BaseException - fix #580
2017-07-30 17:38:42 -03:00
Bruno Oliveira
713f7636e1
Merge pull request #2632 from jmoldow/pep_0415_suppress_exception_context
...
Support PEP-415's Exception.__suppress_context__
2017-07-30 17:22:40 -03:00
Bruno Oliveira
4cd8727379
Merge pull request #2617 from wence-/fix/nondeterministic-fixtures
...
Fix nondeterminism in fixture collection order
2017-07-30 17:17:40 -03:00
Jordan Moldow
2e61f702c0
Support PEP-415's Exception.__suppress_context__
...
PEP-415 states that `exception.__context__` should be suppressed
in traceback outputs, if `exception.__suppress_context__` is
`True`.
Now if a ``raise exception from None`` is caught by pytest,
pytest will no longer chain the context in the test report.
The algorithm in `FormattedExcinfo` now better matches the one
in `traceback.TracebackException`.
`Exception.__suppress_context__` is available in all of the
versions of Python 3 that are supported by pytest.
Fixes #2631 .
2017-07-29 02:39:17 -07:00
Ronny Pfannschmidt
be401bc2f8
fix linting issues
2017-07-28 18:27:59 +02:00
Ronny Pfannschmidt
06a49338b2
make Test Outcomes inherit from BaseException instead of exception
...
fixes #580
2017-07-28 15:28:51 +02:00
Bruno Oliveira
7a12acb6a1
Fix linting
2017-07-28 08:54:55 -03:00
Bruno Oliveira
5acb64be90
Add versionadded tag to pytest_report_collectionfinish hook
2017-07-28 08:54:55 -03:00
Bruno Oliveira
75e6f7717c
Use new hook to report accurate tests skipped in --lf and --ff
2017-07-28 08:54:55 -03:00
Bruno Oliveira
eb1bd3449e
xfail and skipped tests are removed from the "last-failed" cache
...
This accommodates the case where a failing test is marked as
skipped/failed later
2017-07-27 18:43:04 -03:00
Bruno Oliveira
62810f61b2
Make cache plugin always remember failed tests
2017-07-27 14:40:21 -03:00
Bruno Oliveira
17c544e793
Introduce new pytest_report_collectionfinish hook
...
Fix #2622
2017-07-27 10:44:29 -03:00
Bruno Oliveira
3d89905114
Merge remote-tracking branch 'upstream/master' into features
2017-07-26 19:01:28 -03:00
Lawrence Mitchell
a546a612bd
Fix nondeterminism in fixture collection order
...
fixtures.reorder_items is non-deterministic because it reorders based
on iteration over an (unordered) set. Change the code to use an
OrderedDict instead so that we get deterministic behaviour, fixes #920 .
2017-07-26 14:41:10 +01:00
Bruno Oliveira
dd294aafb3
Merge pull request #2557 from blueyed/EncodedFile-name
...
capture: ensure name of EncodedFile being a string
2017-07-26 10:39:10 -03:00
Bruno Oliveira
2c2cf81d0a
Merge pull request #2580 from andras-tim/fix-runpytest-subprocess
...
Avoid interactive pdb when pytest tests itself - fix #2023
2017-07-26 10:37:48 -03:00
Bruno Oliveira
80f4699572
approx raises TypeError in Python 2 for comparison operators other than != and ==
2017-07-25 20:07:10 -03:00
Maik Figura
57a232fc5a
Remove out of scope change
2017-07-25 19:19:14 -03:00
Maik Figura
f0936d42fb
Fix linter errors
2017-07-25 19:17:58 -03:00
Maik Figura
d3ab1b9df4
Add user documentation
...
The new doc section explains why we raise a `NotImplementedError`.
2017-07-25 19:17:58 -03:00
Daniel Hahler
0603d1d500
capture: ensure name of EncodedFile being a string
...
Fixes https://github.com/pytest-dev/pytest/issues/2555 .
2017-07-25 20:37:37 +02:00
Bruno Oliveira
595ecd23fd
Merge pull request #2548 from blueyed/skip-fix-lineno
...
Fix lineno offset in show_skipped
2017-07-25 13:35:14 -03:00
Daniel Hahler
869eed9898
Fix lineno offset in show_skipped
...
The line number is 0-based here, so add 1.
2017-07-25 15:19:47 +02:00
Daniel Hahler
72531f30c0
Improve error message for CollectError with skip/skipif
2017-07-25 15:14:28 +02:00
Bruno Oliveira
73c6122f35
Merge remote-tracking branch 'upstream/master' into features
2017-07-24 21:12:51 -03:00
Bruno Oliveira
70d9f8638f
Merge pull request #2610 from AgriConnect/doctest-lineno
...
Report lineno from doctest
2017-07-24 16:29:02 -03:00
Bruno Oliveira
e44284c125
Merge pull request #2611 from segevfiner/patch-1
...
Early import colorama so that it get's the correct terminal
2017-07-24 12:37:22 -03:00
Nguyễn Hồng Quân
cdaa720bc4
Merge remote-tracking branch 'upstream/master' into doctest-lineno
2017-07-24 21:49:35 +07:00
Segev Finer
d0ecfdf00f
Delete trailing whitespace
2017-07-24 16:55:50 +03:00
Florian Bruhin
81ad185f0d
Merge pull request #2595 from nicoddemus/docs-rootdir-pythonpath
...
Clarify PYTHONPATH changes and ``rootdir`` roles
2017-07-24 15:06:38 +02:00
Segev Finer
43544a431c
Early import colorama so that it get's the correct terminal
2017-07-24 15:17:39 +03:00
Nguyễn Hồng Quân
af2c153324
Report lineno from doctest
...
This is to fix pytest-sugar#122 issue.
2017-07-24 11:52:24 +07:00
Bruno Oliveira
1b732fe361
Merge pull request #2606 from kalekundert/simplify-numpy
...
Make approx more compatible with numpy
2017-07-22 14:21:08 -03:00
Kale Kundert
7e0553267d
Remove unused import.
2017-07-22 09:19:13 -07:00
Kale Kundert
ebc7346be4
Raise TypeError for types that can't be compared to arrays.
2017-07-22 09:05:12 -07:00
Kale Kundert
a3b35e1c4b
Remove `raises` and `approx` from `python.py`.
...
These two classes were recently moved to `python_api.py`, but it seems
that they found their way back into the original file somehow. This
commit removes them again to avoid out-of-date code duplication.
2017-07-22 08:36:15 -07:00
Kale Kundert
495f731760
Simplify how comparisons with numpy arrays work.
...
Previously I was subverting the natural order of operations by
subclassing from `ndarray`, but it turns out that you can tell just
numpy to call your operator instead of its by setting the
`__array_priority__` attribute on your class. This is much simpler, and
it turns out the be a little more robust, too.
2017-07-22 07:52:03 -07:00
Andras Tim
50764d9ebb
Avoid interactive pdb when pytest tests itself - fix #2023
...
The debugging.py calls post_mortem() on error and pdb will drops an
interactive debugger when the stdin is a readable fd.
2017-07-21 21:29:03 +02:00
Bruno Oliveira
6461dc9fc6
Merge pull request #2600 from RonnyPfannschmidt/mark_explicit_params
...
fix #2540 , introduce mark.with_args
2017-07-21 10:42:25 -03:00
Daniel Hahler
97e5a3c889
Fix help for filterwarnings ini option
2017-07-21 14:21:31 +02:00
Ronny Pfannschmidt
65b2de13a3
fix #2540 , introduce mark.with_args
2017-07-21 13:37:09 +02:00
Bruno Oliveira
3d24485cae
Clarify PYTHONPATH changes and ``rootdir`` roles
...
- Also minor adjustments in the docs (wording, formatting, links, etc).
Fix #2589
2017-07-21 07:28:11 -03:00
Bruno Oliveira
7341da1bc1
Introduce pytest.mark.filterwarnings
2017-07-20 22:31:49 -03:00
Bruno Oliveira
abb5d20841
Merge branch 'master' into features
2017-07-20 22:10:58 -03:00
Bruno Oliveira
da12c52347
Fix: do not load hypothesis during test_logging_initialized_in_test
...
A recent release seem to have added a "logging" import to the top-level,
which breaks test_logging_initialized_in_test
2017-07-20 21:43:24 -03:00
Floris Bruynooghe
56e6b4b501
Merge pull request #2578 from Llandy3d/2375
...
Provides encoding attribute on CaptureIO
2017-07-20 23:14:14 +02:00
Bruno Oliveira
d44565f385
Merge remote-tracking branch 'upstream/master' into fix-flake8-errors
2017-07-19 17:57:30 -03:00
Bruno Oliveira
26ee2355d9
Merge remote-tracking branch 'upstream/features' into fix-flake8-errors
2017-07-19 17:09:05 -03:00
Bruno Oliveira
c92760dca8
Merge branch 'fix-flake8-issues'
2017-07-19 17:03:36 -03:00
Florian Bruhin
eb79fa7825
Merge pull request #2590 from nicoddemus/current-test-var
...
Introduce new PYTEST_CURRENT_TEST environment variable
2017-07-19 15:56:32 +02:00
Bruno Oliveira
2d4f1f022e
Introduce PYTEST_CURRENT_TEST environment variable
...
Fix #2583
2017-07-19 10:01:50 -03:00
Ronny Pfannschmidt
62556bada6
remove the MARK_INFO_ATTRIBUTE warning until we can fix internal usage
...
fixes #2573
2017-07-19 08:44:52 +02:00
Bruno Oliveira
bd96b0aabc
Remove _pytest/impl file
...
The file apparently contains an early design document to what
has become @pytest.fixture and can be deleted
2017-07-18 09:47:06 -03:00
Bruno Oliveira
7b1870a94e
Fix flake8 in features branch
2017-07-17 21:16:14 -03:00
Bruno Oliveira
4fd92ef9ba
Merge branch 'fix-flake8-issues' into features
2017-07-17 21:05:39 -03:00
Andras Tim
b49e8baab3
Fixed E731 flake8 errors
...
do not assign a lambda expression, use a def
2017-07-17 01:44:23 +02:00
Andras Tim
15610289ac
Fixed E712 flake8 errors
...
comparison to True should be ‘if cond is True:’ or ‘if cond:’
2017-07-17 01:44:23 +02:00
Andras Tim
5ae59279f4
Fixed E704 flake8 errors
...
multiple statements on one line (def)
2017-07-17 01:44:23 +02:00
Andras Tim
7d2ceb7872
Fixed E501 flake8 errors
...
line too long (> 120 characters)
2017-07-17 01:44:23 +02:00
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
17a21d540b
Fixed E301 flake8 errors
...
expected 1 blank line, found 0
2017-07-17 01:44:23 +02:00
Andras Tim
c9a081d1a3
Fixed E271 flake8 errors
...
multiple spaces after keyword
2017-07-17 01:44:22 +02:00
Andras Tim
195a816522
Fixed E265 flake8 errors
...
block comment should start with ‘# ‘
2017-07-17 01:44:22 +02:00
Andras Tim
8f3eb6dfc7
Fixed E261 flake8 errors
...
at least two spaces before inline comment
2017-07-17 01:44:22 +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
4c24947785
Fixed E241 flake8 errors
...
multiple spaces after ‘,’
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
4b22f270a3
Fixed E226 flake8 errors
...
missing whitespace around arithmetic operator
2017-07-17 01:44:22 +02:00
Andras Tim
2e8caefcab
Fixed E225 flake8 errors
...
missing whitespace around operator
2017-07-17 01:44:22 +02:00
Andras Tim
3fabc4d219
Fixed E222 flake8 errors
...
multiple spaces after operator
2017-07-17 01:44:22 +02:00
Andras Tim
f640e0cb04
Fixed E221 flake8 errors
...
multiple spaces before operator
2017-07-17 01:44:22 +02:00
Andras Tim
ba0a4d0b2e
Fixed E202 flake8 errors
...
whitespace before ‘)’
2017-07-17 01:28:17 +02:00
Andras Tim
1ff54ba205
Fixed E201 flake8 errors
...
whitespace after ‘(‘
2017-07-17 01:28:17 +02:00
Andras Tim
df54bf0db5
Fixed E131 flake8 errors
...
continuation line unaligned for hanging indent
2017-07-17 01:28:16 +02:00
Andras Tim
1c935db571
Fixed E129 flake8 errors
...
visually indented line with same indent as next logical line
2017-07-17 01:28:16 +02:00
Andras Tim
cf97159009
Fixed E128 flake8 errors
...
continuation line under-indented for visual indent
2017-07-17 01:28:16 +02:00