diff --git a/Makefile b/Makefile index 050386da4f..f0ae832298 100644 --- a/Makefile +++ b/Makefile @@ -557,7 +557,7 @@ print-%: size=100 test-python-proto: - python3 -m pytest -c pytest_PROTO.ini PROTO_tests/ --size=$(size) $(ARKOUDA_PYTEST_OPTIONS) + python3 -m pytest -c pytest.ini --size=$(size) $(ARKOUDA_PYTEST_OPTIONS) CLEAN_TARGETS += test-clean .PHONY: test-clean diff --git a/PROTO_tests/conftest.py b/PROTO_tests/conftest.py index 8afe9ad42e..d350799766 100644 --- a/PROTO_tests/conftest.py +++ b/PROTO_tests/conftest.py @@ -63,11 +63,12 @@ def pytest_configure(config): pytest.nl = _get_test_locales(config) pytest.seed = None if config.getoption("seed") == "" else eval(config.getoption("seed")) pytest.prob_size = [eval(x) for x in config.getoption("size").split(",")] + pytest.test_running_mode = TestRunningMode(os.getenv("ARKOUDA_RUNNING_MODE", "CLASS_SERVER")) @pytest.fixture(scope="session", autouse=True) def startup_teardown(): - test_running_mode = TestRunningMode(os.getenv("ARKOUDA_RUNNING_MODE", "CLASS_SERVER")) + test_running_mode = pytest.test_running_mode if not importlib.util.find_spec("pytest") or not importlib.util.find_spec("pytest_env"): raise EnvironmentError("pytest and pytest-env must be installed") diff --git a/PROTO_tests/tests/categorical_test.py b/PROTO_tests/tests/categorical_test.py index c02531db07..1e105592ec 100644 --- a/PROTO_tests/tests/categorical_test.py +++ b/PROTO_tests/tests/categorical_test.py @@ -10,6 +10,7 @@ from arkouda.categorical import Categorical from arkouda.testing import assert_categorical_equal + @pytest.fixture def df_test_base_tmp(request): df_test_base_tmp = "{}/.categorical_test".format(os.getcwd()) @@ -127,7 +128,6 @@ def test_creation_from_categorical(self, size): expected_cat = ak.Categorical(strings1) assert_categorical_equal(ak_cat2, expected_cat) - def test_substring_search(self): cat = self.create_basic_categorical() # update to use regex flag once #2714 is resolved diff --git a/PROTO_tests/tests/client_test.py b/PROTO_tests/tests/client_test.py index 69c4d6a539..3b2356e83e 100644 --- a/PROTO_tests/tests/client_test.py +++ b/PROTO_tests/tests/client_test.py @@ -2,7 +2,7 @@ import arkouda as ak from arkouda.client import generic_msg -from server_util.test.server_test_util import start_arkouda_server +from server_util.test.server_test_util import TestRunningMode, start_arkouda_server class TestClient: @@ -42,6 +42,10 @@ def test_disconnect_on_disconnected_client(self): ak.disconnect() ak.connect(server=pytest.server, port=pytest.port) + @pytest.mark.skipif( + pytest.test_running_mode == TestRunningMode.CLIENT, + reason="start_arkouda_server won't restart if running mode is client", + ) def test_shutdown(self): """ Tests the ak.shutdown() method diff --git a/pytest_PROTO.ini b/pytest.ini similarity index 98% rename from pytest_PROTO.ini rename to pytest.ini index cec734461a..24141dbc83 100644 --- a/pytest_PROTO.ini +++ b/pytest.ini @@ -7,7 +7,7 @@ testpaths = PROTO_tests/tests/bigint_agg_test.py PROTO_tests/tests/bitops_test.py PROTO_tests/tests/categorical_test.py - PROTO_tests/tests/check.py + PROTO_tests/tests/check.py PROTO_tests/tests/client_dtypes_test.py PROTO_tests/tests/client_test.py PROTO_tests/tests/coargsort_test.py