Make test runs work from any directory
This commit is contained in:
parent
dd6603992d
commit
f82c2bcc23
|
@ -1,4 +1,9 @@
|
|||
[paths]
|
||||
source = ${PROJECT_DIR-default .}/src/
|
||||
[html]
|
||||
directory = ${PROJECT_DIR-default .}/htmlcov
|
||||
[run]
|
||||
data_file = ${PROJECT_DIR-default .}/.coverage
|
||||
omit =
|
||||
*apps.py,
|
||||
*migrations/*,
|
||||
|
|
1
.envrc
1
.envrc
|
@ -10,3 +10,4 @@ layout_postgres() {
|
|||
fi
|
||||
}
|
||||
layout postgres
|
||||
export PROJECT_DIR=$(pwd)
|
||||
|
|
2
dev.sh
2
dev.sh
|
@ -71,7 +71,7 @@ check (){
|
|||
|
||||
test (){
|
||||
export DJANGO_SETTINGS_MODULE=network_inventory.settings.ram_test
|
||||
pytest -nauto --nomigrations --cov-report=html --cov=./src ./src
|
||||
pytest -nauto --nomigrations --cov-config="$PROJECT_DIR/.coveragerc" --cov-report=html "$PROJECT_DIR/src"
|
||||
}
|
||||
|
||||
update (){
|
||||
|
|
Loading…
Reference in New Issue