-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
AssertionError has no attribute '__cause__' #2343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
interesting, according to https://github.com/pytest-dev/pytest/blob/master/_pytest/_code/code.py#L620 this should not happen, care to elaborate on your environment? |
@RonnyPfannschmidt In another test I call:
Where |
@icemac at first glance that seems unlikely, but there may be some merit to investigating this in detail, its also a potential to restructure things, we shouldn't do such decisions at run-time at all |
The simplest fix is to check against This is in line with our general consensus that we should avoid relying on builtins at run-time (same deal with |
@icemac would you care to contribute a PR with that small fix? |
@nicoddemus Okay. |
Fix see #2359. |
Fix #2343: Replace version checks by constants.
The traceback below happened using Python 2.7.13 the
AssertionError
was caused by a normalassert
statement those assertion was false.Versions:
plugins: cov-2.4.0, flake8-0.8.1, remove-stale-bytecode-2.1, rerunfailures-2.1.0, sugar-0.8.0
pytest 3.0.7, Python 2.7.13 on Mac OS 10.12
The text was updated successfully, but these errors were encountered: