Skip to content

Commit

Permalink
Disable async validation for builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
fornellas committed Dec 17, 2019
1 parent 3988fc1 commit 831334d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions testslide/mock_callable.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,12 @@ def _validate_patch(
)
if (
coroutine_function
and not inspect.iscoroutinefunction(template_value)
and (
# FIXME We cant reliably introspect coroutine functions
# for builtins: https://bugs.python.org/issue38225
type(template_value) is not type(list.append)
and not inspect.iscoroutinefunction(template_value)
)
and not callable_returns_coroutine
):
raise ValueError(
Expand Down Expand Up @@ -640,7 +645,12 @@ def _validate_patch(
)
if (
coroutine_function
and not inspect.iscoroutinefunction(original_callable)
and (
# FIXME We cant reliably introspect coroutine functions
# for builtins: https://bugs.python.org/issue38225
type(original_callable) is not type(list.append)
and not inspect.iscoroutinefunction(original_callable)
)
and not callable_returns_coroutine
):
raise ValueError(
Expand Down

0 comments on commit 831334d

Please sign in to comment.