Bruno Oliveira
6821d36ca5
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2017-10-24 19:57:14 -02:00
Tom Dalton
14e3a5fcb9
Move the generic separator to a constant
2017-10-24 10:42:16 +01: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
Ceridwen
3da28067f3
Replace introspection in compat.getfuncargnames() with inspect/funcsigs.signature
2017-10-19 16:01:26 -07:00
hugovk
ef732fc51d
Remove code for unsupported Python versions
2017-10-10 08:54:56 +03: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
Bruno Oliveira
a993add783
Allow tests declared as @staticmethod to use fixtures
...
Fix #2699
2017-08-17 20:44:19 -03:00
Andreas Pelme
39331856ed
Use the correct stacklevel for getfuncargvalue() deprecation warning.
...
Fixed #2681 .
2017-08-13 14:59:33 +02: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
Ronny Pfannschmidt
06a49338b2
make Test Outcomes inherit from BaseException instead of exception
...
fixes #580
2017-07-28 15:28:51 +02: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
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
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
8f3eb6dfc7
Fixed E261 flake8 errors
...
at least two spaces before inline comment
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
cf97159009
Fixed E128 flake8 errors
...
continuation line under-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
0be97624b7
Fixed E121 flake8 errors
...
continuation line under-indented for hanging 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
4e4ebbef5a
Improve test to ensure the expected function is re-raised
2017-06-13 20:16:48 -03:00
Ryan Fitzpatrick
5a856b6e29
handle and reraise subrequest finalizer exceptions
2017-06-12 21:26:42 -04:00
Bruno Oliveira
d86c89e193
Revert refactor of old-style to new-style classes
...
As discussed in the mailing list, unfortunately this might break APIs
due to the subtle differences between new and old-style classes (see #2398 ).
This reverts commit d4afa1554b
from PR #2179 .
2017-05-17 18:20:51 -03:00
Bruno Oliveira
f3b359f5b8
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
...
# Conflicts:
# _pytest/capture.py
# _pytest/compat.py
# _pytest/python.py
# testing/python/collect.py
# testing/test_mark.py
2017-05-03 19:04:53 -03:00
Ben Lloyd
21f1c2b03f
Update fixtures.py
...
Corrected "or or" typo in docstring (and made indentation consistent).
2017-04-07 16:48:38 +01:00
Ronny Pfannschmidt
c9ab421398
fix python2 only import loop failure
2017-03-28 11:45:06 +02:00
Ronny Pfannschmidt
7cdefce656
fix up oversights
2017-03-28 11:45:06 +02:00
Ronny Pfannschmidt
92f6ab1881
fix all singular internal module imports and add a test for them
2017-03-28 11:45:06 +02:00
Ronny Pfannschmidt
23bc9815c4
remove pytest_namespace from _pytest.fixtures
2017-03-28 11:45:06 +02:00
Ronny Pfannschmidt
61f418a267
hollow out pytest_namespace in _pytest.fixtures
2017-03-28 11:45:06 +02:00
Ronny Pfannschmidt
c74103f395
remove pytest_namespace from recwarn and fixture decorators
2017-03-28 11:45:06 +02: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
Bruno Oliveira
78194093af
Improve warning representation in terminal plugin and fix tests
2017-03-16 21:57:32 -03:00
Bruno Oliveira
1e0cf5ce4d
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
...
# Conflicts:
# AUTHORS
# CHANGELOG.rst
# _pytest/pytester.py
2017-03-10 15:54:05 -03:00
Ran Benita
3a0a0c2df9
Ignore errors raised from descriptors when collecting fixtures
...
Descriptors (e.g. properties) such as in the added test case are
triggered during collection, executing arbitrary code which can raise.
Previously, such exceptions were propagated and failed the collection.
Now these exceptions are caught and the corresponding attributes are
silently ignored.
A better solution would be to completely skip access to all custom
descriptors, such that the offending code doesn't even trigger. However
I think this requires manually going through the instance and all of its
MRO for each and every attribute checking if it might be a proper
fixture before accessing it. So I took the easy route here.
In other words, putting something like this in your test class is still
a bad idea...:
@property
def innocent(self):
os.system('rm -rf /')
Fixes #2234 .
2017-02-07 14:27:34 +02:00
Ran Benita
87fb689ab1
Remove an unneeded `except KeyboardInterrupt`
...
KeyboardInterrupt is a subclass of BaseException, but not of Exception.
Hence if we remove this except, KeyboardInterrupts will still be raised
so the behavior stays the same.
2017-02-07 14:12:09 +02:00
mandeep
d4afa1554b
Refactored old style classes to new style classes
2017-01-08 22:52:42 -06:00
Bruno Oliveira
1eb5a690d4
Fix flake8 E305 and E306 errors
...
These errors started to appear with flake8-3.1.1, while they don't appear with
version 3.1.0 (weird).
2016-11-20 18:59:15 -02:00