You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/04/26 16:00:57 UTC

[GitHub] [beam] benWize commented on a change in pull request #14481: [BEAM-3713] Moving integration tests from nose to pytest

benWize commented on a change in pull request #14481:
URL: https://github.com/apache/beam/pull/14481#discussion_r620435599



##########
File path: sdks/python/scripts/run_integration_test.sh
##########
@@ -270,11 +281,24 @@ fi
 # Run tests and validate that jobs finish successfully.
 
 echo ">>> RUNNING integration tests with pipeline options: $PIPELINE_OPTS"
-echo ">>>   test options: $TEST_OPTS"
-# TODO(BEAM-3713): Pass $SUITE once migrated to pytest. xunitmp doesn't support
-#   suite names.
-python setup.py nosetests \
-  --test-pipeline-options="$PIPELINE_OPTS" \
-  --with-xunitmp --xunitmp-file=$XUNIT_FILE \
-  --ignore-files '.*py3\d?\.py$' \
-  $TEST_OPTS
+if [[ "$PYTEST" = true ]]; then
+    echo ">>>   pytest options: $TEST_OPTS"
+    ARGS="-o junit_suite_name=$SUITE --junitxml=pytest_$SUITE.xml $TEST_OPTS"
+#   Handle markers as an independient argument from $TEST_OPTS to prevent errors in space separeted flags

Review comment:
       Fixed!

##########
File path: sdks/python/scripts/run_integration_test.sh
##########
@@ -270,11 +281,24 @@ fi
 # Run tests and validate that jobs finish successfully.
 
 echo ">>> RUNNING integration tests with pipeline options: $PIPELINE_OPTS"
-echo ">>>   test options: $TEST_OPTS"
-# TODO(BEAM-3713): Pass $SUITE once migrated to pytest. xunitmp doesn't support
-#   suite names.
-python setup.py nosetests \
-  --test-pipeline-options="$PIPELINE_OPTS" \
-  --with-xunitmp --xunitmp-file=$XUNIT_FILE \
-  --ignore-files '.*py3\d?\.py$' \
-  $TEST_OPTS
+if [[ "$PYTEST" = true ]]; then
+    echo ">>>   pytest options: $TEST_OPTS"

Review comment:
       Fixed!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org