Skip to content

Commit

Permalink
Script to run tests on Windows using pytest.
Browse files Browse the repository at this point in the history
This script allows for a temporary test failure by repeating the test 5
times. This is useful to avoid false positives due to random failures.
  • Loading branch information
claudiodsf committed May 24, 2024
1 parent 92e9768 commit c6a6d0f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ before-build = './scripts/get_fftw3.sh'
before-all = '%CONDA%\Scripts\conda.exe install fftw'
before-build = 'pip install delvewheel'
repair-wheel-command = 'delvewheel repair --add-path %CONDA%\Library\bin -w {dest_dir} {wheel}'
test-requires = ''
test-command = 'python -m stockwell.tests.test_stockwell'
test-requires = 'pytest'
test-command = '{package}\scripts\test_stockwell.bat'
11 changes: 11 additions & 0 deletions scripts/test_stockwell.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@echo off
REM Test Stockwell on Windows using pytest
REM Allows for a temporary test failure by repeating the test 5 times
REM (c) 2024 Claudio Satriano <satriano@ipgp.fr>
set /a n=0
:loop
pytest --pyargs stockwell && exit /b 0
set /a n+=1
if %n% gtr 5 goto :end
goto :loop
:end

0 comments on commit c6a6d0f

Please sign in to comment.