From 23d82071ee0cf19000f08070b3a2fecc4911069f Mon Sep 17 00:00:00 2001 From: Sophie Tan Date: Fri, 26 Feb 2021 09:56:36 -0800 Subject: [PATCH] Add pytest-xdist dependency and -n auto option (#637) --- setup.py | 1 + tox.ini | 2 ++ 2 files changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 23eb1cce5..f20c4e660 100644 --- a/setup.py +++ b/setup.py @@ -263,6 +263,7 @@ def _get_arrow_lib_as_linker_input(self): 'pytest-cov', 'pytest-rerunfailures', 'pytest-timeout', + 'pytest-xdist', 'coverage', 'pexpect', 'mock', diff --git a/tox.ini b/tox.ini index da305471d..d000cf4a2 100644 --- a/tox.ini +++ b/tox.ini @@ -46,6 +46,7 @@ setenv = unit-integ: SNOWFLAKE_TEST_TYPE = (unit or integ) !unit-!integ: SNOWFLAKE_TEST_TYPE = (unit or integ) unit: SNOWFLAKE_TEST_TYPE = unit + unit: SNOWFLAKE_PYTEST_OPTS = {env:SNOWFLAKE_PYTEST_OPTS:} -n auto integ: SNOWFLAKE_TEST_TYPE = integ # Add common parts into pytest command SNOWFLAKE_PYTEST_COV_LOCATION = {env:JUNIT_REPORT_DIR:{toxworkdir}}/junit.{envname}-{env:cloud_provider:dev}.xml @@ -87,6 +88,7 @@ deps = pytest-cov pytest-rerunfailures pytest-timeout + pytest-xdist mock skip_install = True setenv = {[testenv]setenv}