Merge pull request #3278 from nicoddemus/revert-more_itertools-master
Revert introduction of more_itertools on master
This commit is contained in:
commit
51abdb80db
|
@ -2,8 +2,7 @@ import math
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import py
|
import py
|
||||||
from six.moves import zip, filterfalse
|
from six.moves import zip
|
||||||
from more_itertools.more import always_iterable
|
|
||||||
|
|
||||||
from _pytest.compat import isclass
|
from _pytest.compat import isclass
|
||||||
from _pytest.outcomes import fail
|
from _pytest.outcomes import fail
|
||||||
|
@ -567,10 +566,14 @@ def raises(expected_exception, *args, **kwargs):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
__tracebackhide__ = True
|
__tracebackhide__ = True
|
||||||
for exc in filterfalse(isclass, always_iterable(expected_exception)):
|
|
||||||
msg = ("exceptions must be old-style classes or"
|
msg = ("exceptions must be old-style classes or"
|
||||||
" derived from BaseException, not %s")
|
" derived from BaseException, not %s")
|
||||||
|
if isinstance(expected_exception, tuple):
|
||||||
|
for exc in expected_exception:
|
||||||
|
if not isclass(exc):
|
||||||
raise TypeError(msg % type(exc))
|
raise TypeError(msg % type(exc))
|
||||||
|
elif not isclass(expected_exception):
|
||||||
|
raise TypeError(msg % type(expected_exception))
|
||||||
|
|
||||||
message = "DID NOT RAISE {0}".format(expected_exception)
|
message = "DID NOT RAISE {0}".format(expected_exception)
|
||||||
match_expr = None
|
match_expr = None
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
``pytest`` now depends on the `more_itertools <https://github.com/erikrose/more-itertools>`_ package.
|
|
1
setup.py
1
setup.py
|
@ -60,7 +60,6 @@ def main():
|
||||||
'six>=1.10.0',
|
'six>=1.10.0',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
'attrs>=17.2.0',
|
'attrs>=17.2.0',
|
||||||
'more_itertools>=4.0.0',
|
|
||||||
]
|
]
|
||||||
# if _PYTEST_SETUP_SKIP_PLUGGY_DEP is set, skip installing pluggy;
|
# if _PYTEST_SETUP_SKIP_PLUGGY_DEP is set, skip installing pluggy;
|
||||||
# used by tox.ini to test with pluggy master
|
# used by tox.ini to test with pluggy master
|
||||||
|
|
Loading…
Reference in New Issue