Skip to content

Commit 7147c08

Browse files
committed
Run example tests in venv
Signed-off-by: Cristian Le <[email protected]>
1 parent 13b6015 commit 7147c08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/examples/test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ rlJournalStart
1212
fi
1313
rlRun "pushd $tmp"
1414
rlRun "tree" 0 "Show directory tree"
15+
rlRun "python3 -m venv .venv --system-site-packages" 0 "Create venv with system packages"
16+
rlRun "source .venv/bin/activate" 0 "Activate venv"
1517
rlRun "set -o pipefail"
1618
rlPhaseEnd
1719

1820
rlPhaseStartTest
19-
rlRun "pip install --user . --config-settings=cmake.verbose=true --no-index --no-build-isolation" 0 "Build the python project"
21+
rlRun "pip install . -v --config-settings=cmake.verbose=true --no-index --no-build-isolation" 0 "Build the python project"
2022
if [ "${HAS_PYTEST}" == True ]; then
23+
rlRun "pip install pytest" 0 "Install pytest in the venv"
2124
rlRun "pytest" 0 "Run built-in pytest"
2225
else
2326
rlRun "python3 test.py" 0 "Test project is installed correctly"

0 commit comments

Comments
 (0)