From d0ac7a54a0d8e7f0f692941beb4eaf57eb7f434c Mon Sep 17 00:00:00 2001 From: Herman Singh Date: Tue, 1 Oct 2024 12:30:24 -0400 Subject: [PATCH] Use cov module instead of folder path --- .github/workflows/pytest.yml | 10 +++++----- Makefile | 4 ++-- .../ddm/test/integrative/integrative_batch_chunk_tests | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index ff88d083..46582e4f 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -40,7 +40,7 @@ jobs: - name: pytest run: | # python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/unit - cd atomsci/ddm/test/unit && python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv + cd atomsci/ddm/test/unit && python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv env: ENV: test @@ -85,7 +85,7 @@ jobs: - name: pytest run: | # TODO: Run this test with pytest for paralell testing - # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/integrative + # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 0 env: ENV: test @@ -131,7 +131,7 @@ jobs: - name: pytest run: | # TODO: Run this test with pytest for paralell testing - # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/integrative + # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 1 env: ENV: test @@ -177,7 +177,7 @@ jobs: - name: pytest run: | # TODO: Run this test with pytest for paralell testing - # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/integrative + # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 2 env: ENV: test @@ -223,7 +223,7 @@ jobs: - name: pytest run: | # TODO: Run this test with pytest for paralell testing - # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/integrative + # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 3 env: ENV: test diff --git a/Makefile b/Makefile index d7fd7498..e666fbe4 100644 --- a/Makefile +++ b/Makefile @@ -122,8 +122,8 @@ pytest-integrative: pytest-unit: @echo "Running unit tests" - docker run -v $(shell pwd)/$(WORK_DIR):/$(WORK_DIR) $(IMAGE_REPO):$(PLATFORM)-$(ENV) \ - /bin/bash -l -c "cd atomsci/ddm/test/unit && python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci/ -vv" + docker run -v $(shell pwd)/$(WORK_DIR):/$(WORK_DIR) $(IMAGE_REPO):$(TAG) \ + /bin/bash -l -c "cd atomsci/ddm/test/unit && python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci -vv" # Run ruff linter ruff: diff --git a/atomsci/ddm/test/integrative/integrative_batch_chunk_tests b/atomsci/ddm/test/integrative/integrative_batch_chunk_tests index a6f26580..cceb7ba5 100755 --- a/atomsci/ddm/test/integrative/integrative_batch_chunk_tests +++ b/atomsci/ddm/test/integrative/integrative_batch_chunk_tests @@ -41,7 +41,7 @@ for folder in "${folders[@]}"; do if [[ -f "$file" && "$folder" != "__pycache__/" ]]; then cd "$folder" echo "Testing $folder" - pytest --capture=sys --capture=fd --cov=atomsci/ -vv + pytest --capture=sys --capture=fd --cov=atomsci -vv cd .. else echo "Skipping folder: $folder. Not a test directory."