[
https://issues.apache.org/jira/browse/BEAM-12985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17423043#comment-17423043
]
Udi Meiri edited comment on BEAM-12985 at 9/30/21, 11:04 PM:
-------------------------------------------------------------
The simplest thing would be to replace the invocation of run_pytest.sh in
tox.ini to plain pytest, like:
{code}pytest -o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6
-m uses_pyarrow{code}
Another option might be to add an --always_xdist flag to the script, in which
case it doesn't pass the -m flag to pytest.
This prevents code duplication for the junit flags.
was (Author: udim):
The simplest thing would be to replace the invocation of run_pytest.sh in
tox.ini to plain pytest, like:
{code}pytest-o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6
-m uses_pyarrow{code}
Another option might be to add an --always_xdist flag to the script, in which
case it doesn't pass the -m flag to pytest.
This prevents code duplication for the junit flags.
> 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
> Priority: P2
>
> {{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)