Added Python cache creation before running the tests.
It looks like pytest is loading some modules without macros. The cache gets created without them. But when we load the same modules with macros it fails.
This commit is contained in:
parent
d796abde2e
commit
b53ffbb032
|
|
@ -35,6 +35,7 @@ jobs:
|
|||
env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
run: |
|
||||
src/kibot --help-outputs
|
||||
python3-coverage erase
|
||||
pytest-3 --test_dir output
|
||||
python3-coverage report
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -77,7 +77,7 @@ test_docker_local:
|
|||
# Run in the same directory to make the __pycache__ valid
|
||||
# Also change the owner of the files to the current user (we run as root like in GitHub)
|
||||
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest \
|
||||
/bin/bash -c "flake8 . --count --statistics ; pytest-3 --test_dir output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/"
|
||||
/bin/bash -c "flake8 . --count --statistics ; src/kibot --help-outputs ; pytest-3 --test_dir output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/"
|
||||
$(PY_COV) report
|
||||
x-www-browser htmlcov/index.html
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ from kibot.misc import (MISSING_TOOL, WRONG_INSTALL)
|
|||
cov = coverage.Coverage()
|
||||
mocked_check_output_FNF = True
|
||||
|
||||
|
||||
# Important note:
|
||||
# - We can't load the plug-ins twice, the import fails.
|
||||
# - Once we patched them using monkey patch the patch isn't reverted unless we load them again.
|
||||
|
|
|
|||
Loading…
Reference in New Issue