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

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

                Author: ASF GitHub Bot
            Created on: 08/Oct/21 16:56
            Start Date: 08/Oct/21 16:56
    Worklog Time Spent: 10m 
      Work Description: udim commented on a change in pull request #15693:
URL: https://github.com/apache/beam/pull/15693#discussion_r725168238



##########
File path: sdks/python/tox.ini
##########
@@ -247,5 +247,6 @@ deps =
 commands =
   # Log pyarrow and numpy version for debugging
   /bin/sh -c "pip freeze | grep -E '(pyarrow|numpy)'"
-  # TODO(BEAM-12985): Running run_pytest.sh with -m causes us to run all the 
tests twice
-  {toxinidir}/scripts/run_pytest.sh {envname} "{posargs}" '-m uses_pyarrow'
+  # Run pytest directly rather using run_pytest.sh. It doesn't handle
+  # selecting tests with -m (BEAM-12985)
+  pytest -o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6 -m 
uses_pyarrow

Review comment:
       Nit: consider adding `{posargs}` to the end of this line. It might not 
be super useful in this case because I'm guessing this runs quickly, but it 
allows to pass additional arguments to pytest (as in: `tox -e py38-pyarrow-5 -- 
-k my_test`).




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 662852)
    Time Spent: 40m  (was: 0.5h)

> pyarrow tests are executed twice in py38-pyarrow-x tox task
> -----------------------------------------------------------
>
>                 Key: BEAM-12985
>                 URL: https://issues.apache.org/jira/browse/BEAM-12985
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core, testing
>            Reporter: Brian Hulette
>            Assignee: Brian Hulette
>            Priority: P2
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> {{tox -e py37-pyarrow-2}} runs all tests with the "uses_pyarrow" mark twice. 
> This is because run_pytest.sh [runs pytest 
> twice|https://github.com/apache/beam/blob/6beeafff496f69499cdb14bd58c6ac2d9e84d116/sdks/python/scripts/run_pytest.sh#L33],
>  once with {{-m no_xdist}} and once with {{-m 'not no_xdist'}}. The pyarrow 
> task uses [-m 
> uses_pyarrow|https://github.com/apache/beam/blob/6beeafff496f69499cdb14bd58c6ac2d9e84d116/sdks/python/tox.ini#L249]
>  to select tests, but pytest only respects the latest -m argument. So the 
> no_xdist parameters are ignored, and _all_ pyarrow tests are run each time.



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

Reply via email to