Skip to content

Commit

Permalink
Fix test expectations (#6316)
Browse files Browse the repository at this point in the history
  • Loading branch information
kokobhara committed Apr 17, 2024
1 parent 5f67c01 commit b1fe97d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_utils_python.py
Expand Up @@ -239,8 +239,11 @@ def __call__(self, a, b, c):
self.assertEqual(get_func_args(" ".join, stripself=True), ["iterable"])

if platform.python_implementation() == "CPython":
# doesn't work on CPython: https://bugs.python.org/issue42785
self.assertEqual(get_func_args(operator.itemgetter(2)), [])
# This didn't work on older versions of CPython: https://github.com/python/cpython/issues/86951
self.assertIn(
get_func_args(operator.itemgetter(2), stripself=True),
[[], ["args", "kwargs"]],
)
elif platform.python_implementation() == "PyPy":
self.assertEqual(
get_func_args(operator.itemgetter(2), stripself=True), ["obj"]
Expand Down

0 comments on commit b1fe97d

Please sign in to comment.