Skip to content

Commit

Permalink
Fix test expectations (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
kokobhara authored Apr 17, 2024
1 parent de94c5c commit 2870e37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_utils_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,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 2870e37

Please sign in to comment.