From c4850d6bea9c9d3573e34afcaab056c25d86a038 Mon Sep 17 00:00:00 2001 From: Enes <54481799+eneskuluk@users.noreply.github.com> Date: Tue, 14 Nov 2023 15:45:42 -0800 Subject: [PATCH] minor change in test.py and pyproject to test after building wheel --- pyproject.toml | 2 +- test/test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6459cbd..e02f746 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["setuptools", "wheel", "Cython","numpy","protobuf"] before-build = [ "pip install -r requirements_dev.txt", ] -test-command = "python {package}/test/test.py" +test-command = "python {project}/test/test.py {project}/test/inputs/sanity.test.tgz" [tool.cibuildwheel.linux] before-all = "bash install_prereqs.sh && bash install_openssl3.sh && bash install_genomicsdbforwheel.sh" environment = { LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH", OPENSSL_ROOT_DIR="/usr/local"} diff --git a/test/test.py b/test/test.py index f64810f..afde6c1 100644 --- a/test/test.py +++ b/test/test.py @@ -141,8 +141,8 @@ def run_test_connect_with_json(): os.makedirs(tmp_dir) else: sys.exit("Aborting as temporary directory seems to exist!") - -tar = tarfile.open("test/inputs/sanity.test.tgz") +testfile = sys.argv[1] if len(sys.argv) > 0 else 'test/inputs/sanity.test.tgz' +tar = tarfile.open(testfile) tar.extractall(tmp_dir) os.chdir(tmp_dir)