Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
38 lines (27 loc) · 1.01 KB

File metadata and controls

executable file
·
38 lines (27 loc) · 1.01 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
export DEFER_PYDANTIC_BUILD=false
# Note that we need to specify the patch version here so that uv
# won't use unstable (alpha, beta, rc) releases for the tests
PY_VERSION_MIN=">=3.9.0"
PY_VERSION_MAX=">=3.14.0"
function run_tests() {
echo "==> Running tests with Pydantic v2"
uv run --isolated --all-extras pytest "$@"
# Skip Pydantic v1 tests on latest Python (not supported)
if [[ "$UV_PYTHON" != "$PY_VERSION_MAX" ]]; then
echo "==> Running tests with Pydantic v1"
uv run --isolated --all-extras --group=pydantic-v1 pytest "$@"
fi
}
# If UV_PYTHON is already set in the environment, just run the command once
if [[ -n "$UV_PYTHON" ]]; then
run_tests "$@"
else
# If UV_PYTHON is not set, run the command for min and max versions
echo "==> Running tests for Python $PY_VERSION_MIN"
UV_PYTHON="$PY_VERSION_MIN" run_tests "$@"
echo "==> Running tests for Python $PY_VERSION_MAX"
UV_PYTHON="$PY_VERSION_MAX" run_tests "$@"
fi
Morty Proxy This is a proxified and sanitized view of the page, visit original site.