Skip to content

Commit

Permalink
fix: Ran tests for windows as admin
Browse files Browse the repository at this point in the history
  • Loading branch information
hh-space-invader committed Sep 18, 2024
1 parent d6cbf64 commit 5a14348
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ jobs:
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi --without docs --with dev
- name: Run pytest
- name: Run pytest with admin (Windows)
if: runner.os == 'Windows'
run: |
PowerShell -Command "Start-Process poetry -ArgumentList 'run pytest' -Verb RunAs"
- name: Run pytest (Non-Windows)
if: runner.os != 'Windows'
run: |
poetry run pytest
5 changes: 1 addition & 4 deletions tests/test_text_onnx_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ def test_embedding():
), model_desc["model"]

if CI:
if os.path.isfile(MODELS_CACHE_DIR):
os.remove(MODELS_CACHE_DIR)
else:
shutil.rmtree(MODELS_CACHE_DIR)
shutil.rmtree(MODELS_CACHE_DIR)


@pytest.mark.parametrize(
Expand Down

0 comments on commit 5a14348

Please sign in to comment.