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
Andras Tim
57438f3efe
Fixed E127 flake8 errors
...
continuation line over-indented for visual indent
2017-07-17 01:28:16 +02:00
Andras Tim
e855a79dd4
Fixed E126 flake8 errors
...
continuation line over-indented for hanging indent
2017-07-17 01:28:16 +02:00
Andras Tim
92e2cd9c68
Fixed E125 flake8 errors
...
continuation line with same indent as next logical line
2017-07-17 01:28:16 +02:00
Andras Tim
051d76a63f
Fixed E124 flake8 errors
...
closing bracket does not match visual indentation
2017-07-17 01:28:16 +02:00
Andras Tim
425665cf25
Fixed E122 flake8 errors
...
continuation line missing indentation or outdented
2017-07-17 01:28:16 +02:00
Andras Tim
0be97624b7
Fixed E121 flake8 errors
...
continuation line under-indented for hanging indent
2017-07-17 01:28:16 +02:00
Andras Tim
6146ac97d9
Fixed E101 flake8 errors
...
indentation contains mixed spaces and tabs
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
Llandy Riveron Del Risco
ba9a76fdb3
Provides encoding attribute on CaptureIO
...
Fix #2375
2017-07-16 14:29:00 +02:00
Martin Altmayer
e5169a026a
#2574 : --fixtures, --fixtures-per-test keep indentation of docstring
2017-07-15 13:33:11 +02:00
Alex Hartoto
97fdc9a7fe
Ensure final collected line doesn't include artifacts
...
We sometimes would see the following line:
collected 1 item s
just because previous write to the terminal includes number of
characters greater than 'collected 1 item'.
2017-07-13 12:11:20 -07:00
Ronny Pfannschmidt
771cedd3da
Merge pull request #2567 from nicoddemus/add-report-section-docs
...
Add docs for Item.add_report_section in the docs
2017-07-13 10:55:03 +02:00
Ronny Pfannschmidt
81cec9f5e3
Merge pull request #2563 from pv/yield-warn-spam
...
Make YIELD_TEST warning less spammy
2017-07-13 10:45:46 +02:00
Ronny Pfannschmidt
1485a3a902
Merge pull request #2566 from jmsdvl/iss2518
...
Detect and warn/ignore local python installations
2017-07-13 10:44:04 +02:00
John Still
67fca04050
update docs and note; add virtualenv collection tests
2017-07-11 23:14:38 -05:00
Bruno Oliveira
73b07e1439
Add docs for Item.add_report_section in the docs
...
Fix #2381
2017-07-11 21:45:27 -03:00
John Still
b32cfc88da
use presence of activate script rather than sys.prefix to determine if a dir is a virtualenv
2017-07-11 14:32:09 -05:00
John Still
676c4f970d
trim trailing ws
2017-07-11 13:31:11 -05:00
John Still
89c73582ca
ignore the active python installation unless told otherwise
2017-07-11 11:52:16 -05:00
Bruno Oliveira
d9aaab7ab2
Merge remote-tracking branch 'upstream/master' into features
2017-07-10 17:51:59 -03:00
Pauli Virtanen
8a7d98fed9
Make YIELD_TEST warning less spammy
...
Emit it only once per each generator, rather than for each generated
function. Also add information about which test caused it to be emitted.
2017-07-10 21:41:09 +02:00
John Still
80595115b0
replace all _escape_strings to _ascii_escaped
2017-07-10 12:32:27 -05:00
V.Kuznetsov
f471eef661
ini option cache_dir
2017-07-07 13:07:06 +03:00
Ronny Pfannschmidt
ef62b86335
Merge pull request #2492 from kalekundert/features
...
Add support for numpy arrays (and dicts) to approx.
2017-07-06 11:46:51 +02:00
Ronny Pfannschmidt
7cd03d7611
Merge pull request #2554 from nicoddemus/pytest-configure-order
...
Clarify pytest_configure hook call order
2017-07-05 14:22:55 +02:00
Bruno Oliveira
3667086acc
Clarify pytest_configure hook call order
...
Fix #2539
2017-07-05 07:50:59 -03:00
Bruno Oliveira
221f42c5ce
Change --strict help message to clarify it deals with unregistered markers
...
Fix #2444
2017-07-04 20:14:57 -03:00
Kale Kundert
7a1a439049
Use `cls` instead of `ApproxNumpyBase`.
...
Slightly more general, probably doesn't make a difference.
2017-07-04 09:20:52 -07:00
Bruno Oliveira
b62aef3372
Merge branch 'master' into features
2017-07-04 12:44:58 -03:00
Kale Kundert
c111e9dac3
Avoid making multiple ApproxNumpy types.
2017-07-03 22:45:24 -07:00
Kale Kundert
8524a57075
Add "approx" to all the repr-strings.
2017-07-03 22:44:37 -07:00
Bruno Oliveira
6908d93ba1
Merge pull request #2475 from ant31/master
...
[wip] Fix ignore_path condition
2017-07-03 18:57:17 -03:00
Nathaniel Waisbrot
9b9fede5be
allow staticmethods to be detected as test functions
...
Allow a class method decorated `@staticmethod` to be collected as a test
function (if it meets the usual criteria).
This feature will not work in Python 2.6 -- static methods will still be
ignored there.
2017-06-29 07:44:36 -04:00
Ronny Pfannschmidt
9b51fc646c
Merge pull request #2526 from nicoddemus/merge-master-into-features
...
Merge master into features
2017-06-24 11:25:35 +02:00
Antoine Legrand
16df4da1f7
Fix exclude_path check
2017-06-24 10:58:47 +02:00
Bruno Oliveira
3de93657bd
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2017-06-24 00:47:48 -03:00
Ronny Pfannschmidt
0d0b01bded
introduce deprecation warnings for legacy parametersets, fixes #2427
2017-06-23 22:06:49 +02:00
Ronny Pfannschmidt
8d5f2872d3
minor code style fix
2017-06-23 11:59:03 +02:00
Ronny Pfannschmidt
23d016f114
address review comments
...
* enhance api for fetching marks off an object
* rename functions for storing marks
* enhance deprecation message for MarkInfo
2017-06-23 11:05:38 +02:00
Bruno Oliveira
22b7701431
Merge pull request #2480 from nicoddemus/issue-2469-deprecated-call-ctx
...
deprecated_call context manager captures warnings already raised
2017-06-22 10:53:28 -03:00
Ronny Pfannschmidt
1d926011a4
add deprecation warnings for using markinfo attributes
2017-06-22 15:12:50 +02:00
Bruno Oliveira
ff8dbd0ad8
Add tracebackhide to function call form of deprecated_call
2017-06-22 08:54:39 -03:00
Ronny Pfannschmidt
5e832017d5
Merge pull request #2487 from nicoddemus/recursion-error-2486
...
Fix internal error when trying to detect the start of a recursive traceback
2017-06-22 13:40:32 +02:00
Ronny Pfannschmidt
19b12b22e7
store pristine marks on function.pytestmark
...
fixes #2516
2017-06-22 10:48:45 +02:00
Ronny Pfannschmidt
64ae6ae25d
extract application of marks and legacy markinfos
2017-06-22 10:41:28 +02:00
Ronny Pfannschmidt
bdec2c8f9e
move marker transfer to _pytest.mark
2017-06-22 08:45:10 +02:00
Kale Kundert
9597e674d9
Use sets to compare dictionary keys.
2017-06-16 08:25:13 -07:00
Kale Kundert
4d02863b16
Remove a dict-comprehension.
...
Not compatible with python26.
2017-06-15 18:56:09 -07:00
Kale Kundert
50769557e8
Skip the numpy doctests.
...
They seem like more trouble that they're worth.
2017-06-15 14:53:27 -07:00
Kale Kundert
8badb47db6
Implement suggestions from code review.
...
- Avoid importing numpy unless necessary.
- Mention numpy arrays and dictionaries in the docs.
- Add numpy to the list of tox dependencies.
- Don't unnecessarily copy arrays or allocate empty space for them.
- Use code from compat.py rather than writing py2/3 versions of things
myself.
- Avoid reimplementing __repr__ for built-in types.
- Add an option to consider NaN == NaN, because sometimes people use NaN
to mean "missing data".
2017-06-15 09:19:10 -07:00
Ronny Pfannschmidt
4e57a39067
Merge pull request #2468 from nicoddemus/collection-report-2464
...
Fix incorrect "collected items" report when specifying tests on the command-line
2017-06-14 10:57:57 +02:00
Ronny Pfannschmidt
af0344e940
Merge pull request #2500 from nicoddemus/issue-2434-doctest-modules
...
Fix decode error in Python 2 for doctests in docstrings
2017-06-14 05:52:44 +02:00
Bruno Oliveira
97367cf773
Remove obsolete comment from rewrite.py
...
This was made obsolete by 021e843427
2017-06-13 23:12:33 -03:00
Bruno Oliveira
336cf3e1f5
Merge pull request #2496 from rmfitzpatrick/pytest2440_handle_subrequest_finalizer_exceptions
...
Handle exceptions in subrequest finalizers
2017-06-13 23:03:03 -03:00
Bruno Oliveira
4e4ebbef5a
Improve test to ensure the expected function is re-raised
2017-06-13 20:16:48 -03:00
Bruno Oliveira
b09d60c60a
Fix decode error in Python 2 for doctests in docstrings
...
Fix #2434
2017-06-13 19:41:34 -03:00
Max Moroz
21137cf8c5
Add firstresult=True to the hook docs
2017-06-12 19:45:35 -07:00
Ryan Fitzpatrick
5a856b6e29
handle and reraise subrequest finalizer exceptions
2017-06-12 21:26:42 -04:00
Kale Kundert
8c22aee256
Resolve merge conflict due to approx being moved.
2017-06-11 19:46:59 -07:00
Kale Kundert
9f3122fec6
Add support for numpy arrays (and dicts) to approx.
...
This fixes #1994 . It turned out to require a lot of refactoring because
subclassing numpy.ndarray was necessary to coerce python into calling
the right `__eq__` operator.
2017-06-11 19:27:41 -07:00
Ronny Pfannschmidt
6be57a3711
move python api helpers out of the python module
...
this separates exposed normal api from collection elements
2017-06-11 12:27:16 +02:00
Ronny Pfannschmidt
36251e0db4
move approx to own file
2017-06-11 12:15:30 +02:00
Bruno Oliveira
8bb589fc5d
Fix internal error when trying to detect the start of a recursive traceback.
...
Fix #2486
2017-06-09 19:26:26 -03:00
Ronny Pfannschmidt
917b9a8352
Merge pull request #2476 from nicoddemus/fix-2459-numpy-comparison
...
Fix internal error when a recursion error occurs and frames contain objects that can't be compared
2017-06-07 20:34:36 +02:00
Bruno Oliveira
2127a2378a
Fix internal error with recursive tracebacks with that frames contain objects that can't be compared
...
Fix #2459
2017-06-07 14:40:13 -03:00
Ronny Pfannschmidt
d2db6626cf
Merge pull request #2466 from nicoddemus/remove-unicode-warning
...
Remove UnicodeWarning from pytest warnings
2017-06-07 08:00:36 +02:00
Bruno Oliveira
620ba5971f
deprecated_call context manager captures warnings already raised
...
Fix #2469
2017-06-06 22:40:04 -03:00
ApaDoctor
54a90e9555
docs: Create links for objects to show the api
2017-06-06 01:10:32 +02:00
Bruno Oliveira
9d41eaedbf
Issue UnicodeWarning only for non-ascii unicode
...
Fix #2463
2017-06-05 10:43:15 -03:00
Bruno Oliveira
46d157fe07
Fix collection report when collecting a single test item
2017-06-03 20:39:53 -03:00
Bruno Oliveira
87e4a28351
Fix incorrect collected items report when specifying tests on the command-line
...
Fix #2464
2017-06-03 20:39:53 -03:00
Segev Finer
59b3693988
Fixed wrong if in the WindowsConsoleIO workaround
2017-06-02 12:34:26 +03:00
Segev Finer
05796be21a
A workaround for Python 3.6 WindowsConsoleIO breaking with FDCapture
...
Python 3.6 implemented unicode console handling for Windows. This works
by reading/writing to the raw console handle using
``{Read,Write}ConsoleW``.
The problem is that we are going to ``dup2`` over the stdio file
descriptors when doing ``FDCapture`` and this will ``CloseHandle`` the
handles used by Python to write to the console. Though there is still some
weirdness and the console handle seems to only be closed randomly and not
on the first call to ``CloseHandle``, or maybe it gets reopened with the
same handle value when we suspend capturing.
The workaround in this case will reopen stdio with a different fd which
also means a different handle by replicating the logic in
"Py_lifecycle.c:initstdio/create_stdio".
See https://github.com/pytest-dev/py/issues/103
2017-06-02 11:19:03 +03:00
Segev Finer
9abff7f72f
Add a docstring to HelpAction
2017-06-01 22:25:09 +03:00
Segev Finer
f74f14f038
Fix --help with required options
...
This works by adding an argparse Action that will raise an exception in
order to skip the rest of the argument parsing. This prevents argparse
from quitting due to missing required arguments, similar to the way that
the builtin argparse --help option is implemented by raising SystemExit.
Fixes : #1999
2017-06-01 21:29:50 +03:00
Andreas Pelme
021e843427
Fixed #2121 Use `py.path`s fnmatch. This fixes an issue where
...
python_files handled properly when rewriting assertions.
2017-05-31 08:25:04 +02:00
Bruno Oliveira
1dee443c2b
Merge pull request #2445 from nicoddemus/warnings-remove-filter
...
No longer override existing warning filters during warnings capture
2017-05-30 18:14:01 -03:00
Bruno Oliveira
32e2642233
No longer override existing warning filters during warnings capture
...
Fix #2430
2017-05-30 17:17:36 -03:00
Bruno Oliveira
f96a1d89c5
pytest.deprecated_call now captures PendingDeprecationWarning in context manager form
...
Fix #2441
2017-05-30 12:52:18 -03:00
Bruno Oliveira
836dc451f4
Fix unicode issue while running doctests in Python 2
...
Fix #2434
2017-05-26 07:35:14 -03:00
wanghui
d7a5c5716f
Add UnicodeWarning for unicode warnings in Python2
2017-05-26 13:12:02 +08:00
wanghui
c39689da41
Correct warnings with unicode message.
2017-05-25 17:59:42 +08:00
Florian Bruhin
d9b93674c3
Make --cache-show output deterministic
...
This makes sure things don't jump around in the regenerated docs.
2017-05-23 08:01:39 +02:00
Bruno Oliveira
d343f9497c
Merge branch 'release-3.1'
2017-05-22 19:10:06 -03:00
Jason R. Coombs
c9c2c34b44
Remove unused parameter
2017-05-20 04:39:45 -04:00
Jason R. Coombs
9beeef970e
Parse the filename in the generator expression
2017-05-20 04:38:30 -04:00