[ 
https://issues.apache.org/jira/browse/BEAM-3713?focusedWorklogId=588203&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-588203
 ]

ASF GitHub Bot logged work on BEAM-3713:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Apr/21 23:14
            Start Date: 23/Apr/21 23:14
    Worklog Time Spent: 10m 
      Work Description: 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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 588203)
    Time Spent: 29.5h  (was: 29h 20m)

> Consider moving away from nose to nose2 or pytest.
> --------------------------------------------------
>
>                 Key: BEAM-3713
>                 URL: https://issues.apache.org/jira/browse/BEAM-3713
>             Project: Beam
>          Issue Type: Test
>          Components: sdk-py-core, testing
>            Reporter: Robert Bradshaw
>            Assignee: Benjamin Gonzalez
>            Priority: P3
>          Time Spent: 29.5h
>  Remaining Estimate: 0h
>
> Per 
> [https://nose.readthedocs.io/en/latest/|https://nose.readthedocs.io/en/latest/,]
>  , nose is in maintenance mode.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to