2023-04-10 20:23:31 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
export TESTING=True
|
2024-07-28 16:25:31 +08:00
|
|
|
if [[ "$1" == "unit" ]]; then
|
|
|
|
pytest felicity/tests/unit --asyncio-mode=strict -x
|
|
|
|
elif [[ "$1" == "integration" ]]; then
|
|
|
|
pytest felicity/tests/integration --asyncio-mode=strict -x
|
|
|
|
else
|
|
|
|
pytest felicity/tests/unit --asyncio-mode=strict -x
|
|
|
|
pytest felicity/tests/integration --asyncio-mode=strict -x
|
|
|
|
fi
|
2024-07-28 04:32:04 +08:00
|
|
|
export TESTING=False
|
|
|
|
|
|
|
|
|
2024-07-28 16:25:31 +08:00
|
|
|
# manual with stop on first failure
|
2024-07-28 04:32:04 +08:00
|
|
|
# export TESTING=True && pytest felicity/tests/unit --asyncio-mode=strict -x
|
2024-07-28 16:25:31 +08:00
|
|
|
# export TESTING=True && pytest felicity/tests/integration --asyncio-mode=strict -x
|