Skip to content

Commit

Permalink
Closes Bears-R-Us#3411 deprecate tests/client_test.py (Bears-R-Us#3412)
Browse files Browse the repository at this point in the history
Co-authored-by: Amanda Potts <ajpotts@users.noreply.github.com>
  • Loading branch information
ajpotts and ajpotts authored Jul 11, 2024
1 parent ca804bb commit e88da98
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
24 changes: 24 additions & 0 deletions PROTO_tests/tests/client_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest

import arkouda as ak
from arkouda.client import generic_msg
from server_util.test.server_test_util import start_arkouda_server


Expand Down Expand Up @@ -138,3 +139,26 @@ def test_client_get_server_commands(self):
cmds = ak.client.get_server_commands()
for cmd in ["connect", "array", "create1D", "tondarray1D", "info", "str"]:
assert cmd in cmds

def test_client_array_dim_cmd_error(self):
"""
Tests that a user will get a helpful error message if they attempt to
use a multi-dimensional command when the server is not configured to
support multi-dimensional arrays of the given rank.
"""
with pytest.raises(RuntimeError) as cm:
resp = generic_msg("create10D")

err_msg = "Error: Command 'create10D' is not supported with the current server configuration as the maximum array dimensionality is 1. Please recompile with support for at least 10D arrays"
cm.match(err_msg) # Asserts the error msg matches the expected value

def test_client_nd_unimplemented_error(self):
"""
Tests that a user will get a helpful error message if they attempt to
use a multi-dimensional command when only a 1D implementation exists.
"""
with pytest.raises(RuntimeError) as cm:
resp = generic_msg("connect2D")

err_msg = "Error: Command 'connect' is not supported for multidimensional arrays"
cm.match(err_msg) # Asserts the error msg matches the expected value
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ filterwarnings =
testpaths =
tests/array_view_test.py
tests/check.py
tests/client_test.py
tests/coargsort_test.py
tests/extrema_test.py
tests/import_export_test.py
Expand Down
File renamed without changes.

0 comments on commit e88da98

Please sign in to comment.