Skip to content

Commit

Permalink
Fix pytest exit to fail on errors (#334)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Zalewski <[email protected]>
  • Loading branch information
marcinz and marcinz authored May 7, 2022
1 parent bd6baa0 commit 186cd91
Show file tree
Hide file tree
Showing 82 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion tests/integration/test_2d_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ def test_randn():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_3d_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ def test_sum():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_advanced_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,4 +704,4 @@ def test():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_append.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ def test_append(size):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_argmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ def test_argmax():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_array_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ def test_arange_with_dtype():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_array_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@ def test_array_split(size):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_binary_op_broadcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ def test_random(shape, ndim):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_binary_op_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ def test_pow(x, y):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_binary_op_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ def test_array_scalar(lhs_np, rhs_np, lhs_num, rhs_num):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_binary_ufunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,4 @@ def parse_inputs(in_str, dtype_str):
in_np = parse_inputs(args.inputs, args.dtypes)
check_ops([args.op], in_np)
else:
pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_bincount.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ def test_bincount_weights(dtype):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ def test(depth, sizes):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_cholesky.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ def test_complex(n):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_complex_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ def test_single(dtype):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_concatenate_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ def test_column_dstack(size, a):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_contains.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ def test_False():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_convolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ def test_int(shape, filter_shape):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ def operation(lib, *args, **kwargs):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_einsum.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,4 @@ def test_cast(expr):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_eye.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ def test_tall(k):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_fft_c2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@ def test_3d():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_fft_c2r.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ def test_3d():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_fft_hermitian.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ def test_1d_inverse():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_fft_r2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ def test_3d():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_flatten.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ def test_basic(size):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_flip.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ def test_axis_2d(axis):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_get_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_index_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ def test_diag(k):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ def test(custom_partitioning, custom_sharding):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_inlinemap-keeps-region-alive.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ def test_all():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ def operation(lib, *args, **kwargs):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def test_interop():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_intra_array_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ def test_overlap(ndim):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_jacobi.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_length.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ def test_method():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_linspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ def test_axis():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_logical.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ def test_where():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_lstm_backward_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_lstm_simple_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_map_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ def test_inverted_lhs():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ def operation(lib, *args, **kwargs):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_nonzero.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ def test_deprecated_0d():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ def test():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_numpy_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_outer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def test_empty():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_overwrite_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ def test_dtypes(shape, dtype):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_randint.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ def test_2d():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ def test_indexed():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_reduction_axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ def test_3d(shape, axis):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_reduction_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ def test_prod():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_repeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ def test_nd(ndim):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_reshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ def test_ravel(self):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_set_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ def test_reshape():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_singleton_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ def test_all():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ def test_slice_step():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,4 @@ def test():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_squeeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ def test_basic():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_swapaxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ def test_big():
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_tensordot.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def operation(lib, *args, **kwargs):
if __name__ == "__main__":
import sys

pytest.main(sys.argv)
sys.exit(pytest.main(sys.argv))
2 changes: 1 addition & 1 deletion tests/integration/test_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ def test_2d():
if __name__ == "__main__":
import sys

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

0 comments on commit 186cd91

Please sign in to comment.