Skip to content

Commit d5ab1b6

Browse files
Keywords filtering in pytest
1 parent d0bb4db commit d5ab1b6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

profile_tests.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
set -e
44
set -o pipefail
55

6+
echo "Keywords expression for pytest (PYTEST_EXTRA_KEYWORDS): -k '$PYTEST_KEYWORDS'"
7+
echo "Extra args for pytest (PYTEST_EXTRA_ARGS): $PYTEST_EXTRA_ARGS"
68
python -m venv ./venv
79
source ./venv/bin/activate
810
pip install '.[test]'
@@ -33,5 +35,5 @@ pytest \
3335
-o sagemaker_role="$SAGEMAKER_ROLE" \
3436
-o sns_notification_topic_arn="$SNS_NOTIFICATION_TOPIC_ARN" \
3537
--profile --profile-svg \
36-
$PYTEST_EXTRA_ARGS
38+
-k "$PYTEST_KEYWORDS" $PYTEST_EXTRA_ARGS
3739
cd -

run_tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -e
44
set -o pipefail
55

6+
echo "Keywords expression for pytest (PYTEST_EXTRA_KEYWORDS): -k '$PYTEST_KEYWORDS'"
67
echo "Extra args for pytest (PYTEST_EXTRA_ARGS): $PYTEST_EXTRA_ARGS"
78
cat /etc/hosts
89
bash ./compare_release_src.sh
@@ -98,7 +99,7 @@ coverage run -m pytest \
9899
-o vpc_only_security_group="$VPC_ONLY_SECURITY_GROUP" \
99100
-o sagemaker_role="$SAGEMAKER_ROLE" \
100101
-o sns_notification_topic_arn="$SNS_NOTIFICATION_TOPIC_ARN" \
101-
$PYTEST_EXTRA_ARGS || EXIT_CODE=$?
102+
-k "$PYTEST_KEYWORDS" $PYTEST_EXTRA_ARGS || EXIT_CODE=$?
102103
coverage xml
103104
coverage html --show-contexts
104105
cd -

0 commit comments

Comments
 (0)