When I call a function decorated with functools.singledispatch without an argument, I get the following:
Python 3.6.5 (default, Jun 17 2018, 12:13:06)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import functools
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/functools.py", line 803, in wrapper
return dispatch(args.__class__)(*args, **kw)
IndexError: tuple index out of range
I would have expected a TypeError along the lines of
The purpose of using assertRaisesRegexp() was testing the error message. assertRaises() doesn't do this. Needed to restore the appropriate assertion method, but using a non-deprecated alias: assertRaisesRegex().
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
The text was updated successfully, but these errors were encountered: