Skip to content

Commit

Permalink
Revert introduction of more_itertools
Browse files Browse the repository at this point in the history
This was merged on master but really should be on features: we should not
add new dependencies in bug-fix releases

This reverts commits:

* cfaf360
* 14a9b1e
  • Loading branch information
nicoddemus committed Mar 4, 2018
1 parent e980fbb commit 6553468
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
15 changes: 9 additions & 6 deletions _pytest/python_api.py
Expand Up @@ -2,8 +2,7 @@
import sys

import py
from six.moves import zip, filterfalse
from more_itertools.more import always_iterable
from six.moves import zip

from _pytest.compat import isclass
from _pytest.outcomes import fail
Expand Down Expand Up @@ -567,10 +566,14 @@ def raises(expected_exception, *args, **kwargs):
"""
__tracebackhide__ = True
for exc in filterfalse(isclass, always_iterable(expected_exception)):
msg = ("exceptions must be old-style classes or"
" derived from BaseException, not %s")
raise TypeError(msg % type(exc))
msg = ("exceptions must be old-style classes or"
" derived from BaseException, not %s")
if isinstance(expected_exception, tuple):
for exc in expected_exception:
if not isclass(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)
match_expr = None
Expand Down
1 change: 0 additions & 1 deletion changelog/3265.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion setup.py
Expand Up @@ -60,7 +60,6 @@ def main():
'six>=1.10.0',
'setuptools',
'attrs>=17.2.0',
'more_itertools>=4.0.0',
]
# if _PYTEST_SETUP_SKIP_PLUGGY_DEP is set, skip installing pluggy;
# used by tox.ini to test with pluggy master
Expand Down

0 comments on commit 6553468

Please sign in to comment.