Skip to content

Commit e953232

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/examples/test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +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
21-
rlRun "pytest" 0 "Run built-in pytest"
23+
rlRun "python3 -m pytest" 0 "Run built-in pytest"
2224
else
2325
rlRun "python3 test.py" 0 "Test project is installed correctly"
2426
fi

0 commit comments

Comments
 (0)