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



##########
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:
       Please fix indentation

##########
File path: sdks/python/apache_beam/io/gcp/bigquery_read_it_test.py
##########
@@ -29,7 +29,8 @@
 from decimal import Decimal
 from functools import wraps
 
-from nose.plugins.attrib import attr
+from future.utils import iteritems

Review comment:
       Leftover from merge? I think you can remove this line

##########
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
+    if [ -z "$COLLECT_MARKERS" ]; then
+        pytest $ARGS --test-pipeline-options="$PIPELINE_OPTS"
+    else
+        pytest $ARGS --test-pipeline-options="$PIPELINE_OPTS" 
"$COLLECT_MARKERS"
+    fi
+

Review comment:
       Please remove empty lines

##########
File path: 
sdks/python/apache_beam/runners/dataflow/dataflow_exercise_streaming_metrics_pipeline_test.py
##########
@@ -115,7 +115,9 @@ def run_pipeline(self):
     return dataflow_exercise_streaming_metrics_pipeline.run(argv)
 
   # Need not run streaming test in batch mode.
-  @attr('IT', 'ValidatesRunner', 'sickbay-batch')
+  @pytest.mark.no_sickbay_batch
+  @pytest.mark.it_validatesrunner
+  @pytest.mark.it_postcommit

Review comment:
       This is the only test that runs in both ValidatesRunner and post-commit. 
I think that's a bug but let's leave it for this PR.

##########
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:
       Could you also print `$COLLECT_MARKERS` here?




-- 
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:
[email protected]


Reply via email to