From a3efc990f3d22bb3bd067ea790ea34e7237c3e4c Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Wed, 15 Mar 2023 00:41:25 +0100 Subject: [PATCH] update test scripts --- requirements_test.txt | 4 +++- test/run.bat | 2 +- test/run.sh | 6 +----- test/{test00util.py => test_00util.py} | 0 test/{test01vsinfo.py => test_01vsinfo.py} | 0 test/{test02flags.py => test_02flags.py} | 0 test/{test03variant.py => test_03variant.py} | 0 test/{test04combinations.py => test_04combinations.py} | 0 test/{test05cmany.py => test_05cmany.py} | 0 test/{test06xcompile.py => test_06xcompile.py} | 0 test/{test07config.py => test_07config.py} | 0 11 files changed, 5 insertions(+), 7 deletions(-) rename test/{test00util.py => test_00util.py} (100%) rename test/{test01vsinfo.py => test_01vsinfo.py} (100%) rename test/{test02flags.py => test_02flags.py} (100%) rename test/{test03variant.py => test_03variant.py} (100%) rename test/{test04combinations.py => test_04combinations.py} (100%) rename test/{test05cmany.py => test_05cmany.py} (100%) rename test/{test06xcompile.py => test_06xcompile.py} (100%) rename test/{test07config.py => test_07config.py} (100%) diff --git a/requirements_test.txt b/requirements_test.txt index c11086f..3733776 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,5 +1,7 @@ wheel -nose +pytest +pytest-cov +parameterized twine coverage codecov diff --git a/test/run.bat b/test/run.bat index addc7d8..55fa98a 100755 --- a/test/run.bat +++ b/test/run.bat @@ -22,7 +22,7 @@ echo %PIPINSTALL% cd test if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% set PYTHONPATH=%root%\src -%PYTHON% -m nose -d -v --with-id --nocapture --with-coverage --cover-erase --cover-package=..\src --cover-branches %* +%PYTHON% -m pytest --cov=..\src --cov-reset %* if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% exit /b %ERRORLEVEL% diff --git a/test/run.sh b/test/run.sh index c20afe3..9fa8c31 100755 --- a/test/run.sh +++ b/test/run.sh @@ -5,14 +5,10 @@ set -e root=$(cd $(dirname $0)/.. ; pwd) PY=${PYTHON:-python3} -PIP=${PIP:-pip3} -PIP_INSTALL=${PIP_INSTALL:-pip install} # run the cmany unit tests cd $root/test export PYTHONPATH=$root/src -$PY -m nose -d -v --with-id --nocapture \ - --with-coverage --cover-erase --cover-package=../src --cover-branches \ - $* +$PY -m pytest --cov=../src --cov-reset $* exit $? diff --git a/test/test00util.py b/test/test_00util.py similarity index 100% rename from test/test00util.py rename to test/test_00util.py diff --git a/test/test01vsinfo.py b/test/test_01vsinfo.py similarity index 100% rename from test/test01vsinfo.py rename to test/test_01vsinfo.py diff --git a/test/test02flags.py b/test/test_02flags.py similarity index 100% rename from test/test02flags.py rename to test/test_02flags.py diff --git a/test/test03variant.py b/test/test_03variant.py similarity index 100% rename from test/test03variant.py rename to test/test_03variant.py diff --git a/test/test04combinations.py b/test/test_04combinations.py similarity index 100% rename from test/test04combinations.py rename to test/test_04combinations.py diff --git a/test/test05cmany.py b/test/test_05cmany.py similarity index 100% rename from test/test05cmany.py rename to test/test_05cmany.py diff --git a/test/test06xcompile.py b/test/test_06xcompile.py similarity index 100% rename from test/test06xcompile.py rename to test/test_06xcompile.py diff --git a/test/test07config.py b/test/test_07config.py similarity index 100% rename from test/test07config.py rename to test/test_07config.py