Skip to content

Commit

Permalink
Fix test_floating.py test to call sys.exit (#433)
Browse files Browse the repository at this point in the history
Add sys.exit and fix test failures.

Co-authored-by: Marcin Zalewski <mzalewski@nvidia.com>
Co-authored-by: @bryevdv
  • Loading branch information
marcinz and marcinz authored Jun 29, 2022
1 parent 5f2e788 commit 6b5660c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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))

0 comments on commit 6b5660c

Please sign in to comment.