-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use nosetests if python3 is not available
Signed-off-by: Martin Styk <[email protected]>
- Loading branch information
1 parent
7164abf
commit 355cb0d
Showing
2 changed files
with
11 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
#/bin/bash | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
# Use Python 2 version if BKR_PY3 is not defined | ||
if [[ -z ${BKR_PY3} ]]; then | ||
pytest_command="py.test-2"; | ||
elif [[ ${BKR_PY3} == 1 ]]; then | ||
pytest_command="pytest-3"; | ||
# Use nosetests with python2 interpreter | ||
if [[ -z ${BKR_PY3} ]] || [[ ${BKR_PY3} != 1 ]]; then | ||
command="nosetests ${*:--v --traverse-namespace bkr.client.tests}"; | ||
else | ||
pytest_command="py.test-2"; | ||
command="pytest-3"; | ||
fi | ||
|
||
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} \ | ||
$pytest_command | ||
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} "$command" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters