Skip to content

Commit 3bce657

Browse files
committed
pytest-quick
1 parent c9fbf69 commit 3bce657

5 files changed

Lines changed: 35 additions & 2 deletions

File tree

.github/workflows/nightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
pip install -r dev_tools/requirements/envs/pytest.env.txt
4444
pip install --no-deps -e .
4545
- run: |
46-
check/pytest --durations=10 -v -n=0
46+
check/pytest-full --durations=10 -v -n=0

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
pip install -r dev_tools/requirements/envs/pytest.env.txt
4242
pip install --no-deps -e .
4343
- run: |
44-
check/pytest -m 'not notebook and not slow'
44+
check/pytest-quick
4545
4646
dev-tools:
4747
runs-on: ubuntu-24.04

check/pytest

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ thisdir="$(dirname "${BASH_SOURCE[0]}")" || exit $?
1313
topdir="$(git -C "${thisdir}" rev-parse --show-toplevel)" || exit $?
1414
cd "${topdir}" || exit $?
1515

16+
echo "Warning: running the full test suite, which may take tens of minutes."
17+
echo ""
18+
echo " To run the recommended test suite for development: use check/pytest-quick"
19+
echo " To suppress this warning: use check/pytest-full"
20+
echo ""
21+
1622
# Run in parallel by default. Pass the `-n0` option for a single-process run.
1723
# (the last `-n` option wins)
1824
PYTEST_ARGS=( "-n=auto" "$@" )

check/pytest-full

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
# Get the working directory to the repo root.
4+
cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1
5+
cd "$(git rev-parse --show-toplevel)" || exit 1
6+
7+
# Run in parallel by default. Pass the `-n0` option for a single-process run.
8+
# (the last `-n` option wins)
9+
PYTEST_ARGS=( "-n=auto" "$@" )
10+
11+
pytest "${PYTEST_ARGS[@]}" qualtran/
12+
RESULT=$?
13+
14+
exit "$RESULT"

check/pytest-quick

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
# Get the working directory to the repo root.
4+
cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1
5+
cd "$(git rev-parse --show-toplevel)" || exit 1
6+
7+
# Run in parallel by default. Pass the `-n0` option for a single-process run.
8+
# (the last `-n` option wins)
9+
PYTEST_ARGS=( "-n=auto" "-m" 'not slow and not notebook' "$@" )
10+
pytest "${PYTEST_ARGS[@]}" qualtran/
11+
RESULT=$?
12+
13+
exit "$RESULT"

0 commit comments

Comments
 (0)