Skip to content
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

Fix test_floating.py test to call sys.exit #433

Merged
merged 3 commits into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cunumeric/_ufunc/ufunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ def _maybe_convert_output_to_cunumeric_ndarray(
raise TypeError("return arrays must be of ArrayType")

def _prepare_operands(
self, *args: Any, out: Union[ndarray, None], where: bool = True
self,
*args: Any,
out: Union[ndarray, tuple[ndarray, ...], None],
where: bool = True,
) -> tuple[
Sequence[ndarray],
Sequence[Union[ndarray, None]],
Expand Down Expand Up @@ -295,6 +298,8 @@ def _prepare_operands(
computed_out = (None,) * self.nout
elif not isinstance(out, tuple):
computed_out = (out,)
else:
computed_out = out

outputs = tuple(
self._maybe_convert_output_to_cunumeric_ndarray(arr)
Expand Down Expand Up @@ -469,7 +474,7 @@ def _resolve_dtype(
def __call__(
self,
*args: Any,
out: Union[ndarray, None] = None,
out: Union[ndarray, tuple[ndarray, ...], None] = None,
where: bool = True,
casting: CastingKind = "same_kind",
order: str = "K",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ def test_typing_unary(fun, dtype, shape):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))