codecov[bot]: # [Codecov](https://codecov.io/gh/tox-dev/tox/pull/742?src=pr&el=h1) Report
> Merging [#742](https://codecov.io/gh/tox-dev/tox/pull/742?src=pr&el=desc) into [master](https://codecov.io/gh/tox-dev/tox/commit/36ff71d18d10e3c0d4275179d8912abc385b20f0?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/tox-dev/tox/pull/742/graphs/tree.svg?width=650&token=DYodAwDCZ5&height=150&src=pr)](https://codecov.io/gh/tox-dev/tox/pull/742?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #742      +/-   ##
==========================================
+ Coverage   94.67%   94.67%   +<.01%     
==========================================
  Files          11       11              
  Lines        2383     2384       +1     
==========================================
+ Hits         2256     2257       +1     
  Misses        127      127
```


| [Impacted Files](https://codecov.io/gh/tox-dev/tox/pull/742?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [tox/config.py](https://codecov.io/gh/tox-dev/tox/pull/742/diff?src=pr&el=tree#diff-dG94L2NvbmZpZy5weQ==) | `97.75% <100%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/tox-dev/tox/pull/742?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/tox-dev/tox/pull/742?src=pr&el=footer). Last update [36ff71d...0c5a478](https://codecov.io/gh/tox-dev/tox/pull/742?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

diff --git a/changelog/740.feature.rst b/changelog/740.feature.rst
new file mode 100644
index 00000000..236efbd8
--- /dev/null
+++ b/changelog/740.feature.rst
@@ -0,0 +1,2 @@
+Forward ``PROCESSOR_ARCHITECTURE`` by default on Windows to fix
+``platform.machine()``.
diff --git a/tox/config.py b/tox/config.py
index d03c97e0..ec9dc6c2 100755
--- a/tox/config.py
+++ b/tox/config.py
@@ -530,6 +530,7 @@ def tox_addoption(parser):
             # for `multiprocessing.cpu_count()` on Windows
             # (prior to Python 3.4).
             passenv.add("NUMBER_OF_PROCESSORS")
+            passenv.add("PROCESSOR_ARCHITECTURE")  # platform.machine()
             passenv.add("USERPROFILE")  # needed for `os.path.expanduser()`
             passenv.add("MSYSTEM")  # fixes #429
         else:

Consider whitelisting `PROCESSOR_ARCHITECTURE` environment variable
On windows, this is necessary for [`platform.machine()`](https://docs.python.org/3/library/platform.html#platform.machine) to function

```
$ tox --version
2.9.1 imported from c:\users\anthony\appdata\local\temp\venv\lib\site-packages\tox\__init__.pyc
```

```ini
[tox]
envlist = py27
skipsdist = true

[testenv]
commands =
    python -c 'import platform; print(platform.machine())'
```

```
$ tox -e py27
py27 create: C:\Users\Anthony\AppData\Local\Temp\.tox\py27
py27 installed:
py27 runtests: PYTHONHASHSEED='154'
py27 runtests: commands[0] | python -c import platform; print(platform.machine())

______________________________________________________ summary _______________________________________________________
  py27: commands succeeded
  congratulations :)

$ TOX_TESTENV_PASSENV=PROCESSOR_ARCHITECTURE tox -e py27
py27 installed:
py27 runtests: PYTHONHASHSEED='864'
py27 runtests: commands[0] | python -c import platform; print(platform.machine())
AMD64
______________________________________________________ summary _______________________________________________________
  py27: commands succeeded
  congratulations :)
```

Hitting this in https://github.com/pre-commit/pre-commit/pull/685 where I'm working around this by adding `PROCESSOR_ARCHITECTURE` to `passenv`
diff --git a/tests/test_config.py b/tests/test_config.py
index e8e8d559..1f446caa 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -908,6 +908,7 @@ class TestConfigTestEnv:
             assert "TEMP" in envconfig.passenv
             assert "TMP" in envconfig.passenv
             assert "NUMBER_OF_PROCESSORS" in envconfig.passenv
+            assert "PROCESSOR_ARCHITECTURE" in envconfig.passenv
             assert "USERPROFILE" in envconfig.passenv
             assert "MSYSTEM" in envconfig.passenv
         else:

pip install -e .[dev]
parse_log_pytest
pytest
pytest pytest-cov pytest-timeout
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
coverage==6.2
distlib==0.3.9
filelock==3.4.1
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
platformdirs==2.4.0
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
pytest-cov==4.0.0
pytest-timeout==2.1.0
six==1.17.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==1.2.3
-e git+https://github.com/tox-dev/tox.git@36ff71d18d10e3c0d4275179d8912abc385b20f0#egg=tox
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
virtualenv==20.17.1
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: tox
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==6.2
      - distlib==0.3.9
      - filelock==3.4.1
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - platformdirs==2.4.0
      - pytest-cov==4.0.0
      - pytest-timeout==2.1.0
      - six==1.17.0
      - tomli==1.2.3
      - virtualenv==20.17.1
prefix: /opt/conda/envs/tox

tests/test_config.py::TestConfigTestEnv::test_passenv_as_multiline_list[win32]
tests/test_config.py::TestVenvConfig::test_force_dep_with_url tests/test_config.py::TestIniParser::test_getbool tests/test_config.py::TestCmdInvocation::test_listenvs tests/test_config.py::TestCmdInvocation::test_listenvs_verbose_description tests/test_config.py::TestCmdInvocation::test_listenvs_all tests/test_config.py::TestCmdInvocation::test_no_tox_ini
tests/test_config.py::TestVenvConfig::test_config_parsing_minimal tests/test_config.py::TestVenvConfig::test_config_parsing_multienv tests/test_config.py::TestVenvConfig::test_envdir_set_manually tests/test_config.py::TestVenvConfig::test_envdir_set_manually_with_substitutions tests/test_config.py::TestVenvConfig::test_force_dep_version tests/test_config.py::TestVenvConfig::test_process_deps tests/test_config.py::TestVenvConfig::test_is_same_dep tests/test_config.py::TestConfigPlatform::test_config_parse_platform tests/test_config.py::TestConfigPlatform::test_config_parse_platform_rex tests/test_config.py::TestConfigPlatform::test_config_parse_platform_with_factors[win] tests/test_config.py::TestConfigPlatform::test_config_parse_platform_with_factors[lin] tests/test_config.py::TestConfigPlatform::test_config_parse_platform_with_factors[osx] tests/test_config.py::TestConfigPackage::test_defaults tests/test_config.py::TestConfigPackage::test_defaults_distshare tests/test_config.py::TestConfigPackage::test_defaults_changed_dir tests/test_config.py::TestConfigPackage::test_project_paths tests/test_config.py::TestParseconfig::test_search_parents tests/test_config.py::TestParseconfig::test_explicit_config_path tests/test_config.py::test_get_homedir tests/test_config.py::TestGetcontextname::test_blank tests/test_config.py::TestGetcontextname::test_jenkins tests/test_config.py::TestGetcontextname::test_hudson_legacy tests/test_config.py::TestIniParserAgainstCommandsKey::test_command_substitution_from_other_section tests/test_config.py::TestIniParserAgainstCommandsKey::test_command_substitution_from_other_section_multiline tests/test_config.py::TestIniParserAgainstCommandsKey::test_command_substitution_from_other_section_posargs tests/test_config.py::TestIniParserAgainstCommandsKey::test_command_section_and_posargs_substitution tests/test_config.py::TestIniParserAgainstCommandsKey::test_command_env_substitution tests/test_config.py::TestIniParserAgainstCommandsKey::test_command_env_substitution_global tests/test_config.py::TestIniParserAgainstCommandsKey::test_regression_issue595 tests/test_config.py::TestIniParser::test_getstring_single tests/test_config.py::TestIniParser::test_missing_substitution tests/test_config.py::TestIniParser::test_getstring_fallback_sections tests/test_config.py::TestIniParser::test_getstring_substitution tests/test_config.py::TestIniParser::test_getlist tests/test_config.py::TestIniParser::test_getdict tests/test_config.py::TestIniParser::test_normal_env_sub_works tests/test_config.py::TestIniParser::test_missing_env_sub_raises_config_error_in_non_testenv tests/test_config.py::TestIniParser::test_missing_env_sub_populates_missing_subs tests/test_config.py::TestIniParser::test_getstring_environment_substitution_with_default tests/test_config.py::TestIniParser::test_value_matches_section_substitution tests/test_config.py::TestIniParser::test_value_doesn_match_section_substitution tests/test_config.py::TestIniParser::test_getstring_other_section_substitution tests/test_config.py::TestIniParser::test_argvlist tests/test_config.py::TestIniParser::test_argvlist_windows_escaping tests/test_config.py::TestIniParser::test_argvlist_multiline tests/test_config.py::TestIniParser::test_argvlist_quoting_in_command tests/test_config.py::TestIniParser::test_argvlist_comment_after_command tests/test_config.py::TestIniParser::test_argvlist_command_contains_hash tests/test_config.py::TestIniParser::test_argvlist_positional_substitution tests/test_config.py::TestIniParser::test_argvlist_quoted_posargs tests/test_config.py::TestIniParser::test_argvlist_posargs_with_quotes tests/test_config.py::TestIniParser::test_positional_arguments_are_only_replaced_when_standing_alone tests/test_config.py::TestIniParser::test_posargs_are_added_escaped_issue310 tests/test_config.py::TestIniParser::test_substitution_with_multiple_words tests/test_config.py::TestIniParser::test_getargv tests/test_config.py::TestIniParser::test_getpath tests/test_config.py::TestIniParserPrefix::test_basic_section_access tests/test_config.py::TestIniParserPrefix::test_fallback_sections tests/test_config.py::TestIniParserPrefix::test_value_matches_prefixed_section_substitution tests/test_config.py::TestIniParserPrefix::test_value_doesn_match_prefixed_section_substitution tests/test_config.py::TestIniParserPrefix::test_other_section_substitution tests/test_config.py::TestConfigTestEnv::test_commentchars_issue33 tests/test_config.py::TestConfigTestEnv::test_defaults tests/test_config.py::TestConfigTestEnv::test_sitepackages_switch tests/test_config.py::TestConfigTestEnv::test_installpkg_tops_develop tests/test_config.py::TestConfigTestEnv::test_specific_command_overrides tests/test_config.py::TestConfigTestEnv::test_whitelist_externals tests/test_config.py::TestConfigTestEnv::test_changedir tests/test_config.py::TestConfigTestEnv::test_ignore_errors tests/test_config.py::TestConfigTestEnv::test_envbindir tests/test_config.py::TestConfigTestEnv::test_envbindir_jython[jython] tests/test_config.py::TestConfigTestEnv::test_envbindir_jython[pypy] tests/test_config.py::TestConfigTestEnv::test_envbindir_jython[pypy3] tests/test_config.py::TestConfigTestEnv::test_passenv_as_multiline_list[linux2] tests/test_config.py::TestConfigTestEnv::test_passenv_as_space_separated_list[win32] tests/test_config.py::TestConfigTestEnv::test_passenv_as_space_separated_list[linux2] tests/test_config.py::TestConfigTestEnv::test_passenv_with_factor tests/test_config.py::TestConfigTestEnv::test_passenv_from_global_env tests/test_config.py::TestConfigTestEnv::test_passenv_glob_from_global_env tests/test_config.py::TestConfigTestEnv::test_changedir_override tests/test_config.py::TestConfigTestEnv::test_install_command_setting tests/test_config.py::TestConfigTestEnv::test_install_command_must_contain_packages tests/test_config.py::TestConfigTestEnv::test_install_command_substitutions tests/test_config.py::TestConfigTestEnv::test_pip_pre tests/test_config.py::TestConfigTestEnv::test_pip_pre_cmdline_override tests/test_config.py::TestConfigTestEnv::test_simple tests/test_config.py::TestConfigTestEnv::test_substitution_error tests/test_config.py::TestConfigTestEnv::test_substitution_defaults tests/test_config.py::TestConfigTestEnv::test_substitution_notfound_issue246 tests/test_config.py::TestConfigTestEnv::test_substitution_notfound_issue515 tests/test_config.py::TestConfigTestEnv::test_substitution_nested_env_defaults tests/test_config.py::TestConfigTestEnv::test_substitution_positional tests/test_config.py::TestConfigTestEnv::test_substitution_noargs_issue240 tests/test_config.py::TestConfigTestEnv::test_substitution_double tests/test_config.py::TestConfigTestEnv::test_posargs_backslashed_or_quoted tests/test_config.py::TestConfigTestEnv::test_rewrite_posargs tests/test_config.py::TestConfigTestEnv::test_rewrite_simple_posargs tests/test_config.py::TestConfigTestEnv::test_take_dependencies_from_other_testenv[envlist0-deps0] tests/test_config.py::TestConfigTestEnv::test_take_dependencies_from_other_testenv[envlist1-deps1] tests/test_config.py::TestConfigTestEnv::test_take_dependencies_from_other_section tests/test_config.py::TestConfigTestEnv::test_multilevel_substitution tests/test_config.py::TestConfigTestEnv::test_recursive_substitution_cycle_fails tests/test_config.py::TestConfigTestEnv::test_single_value_from_other_secton tests/test_config.py::TestConfigTestEnv::test_factors tests/test_config.py::TestConfigTestEnv::test_factor_ops tests/test_config.py::TestConfigTestEnv::test_envconfigs_based_on_factors tests/test_config.py::TestConfigTestEnv::test_default_factors tests/test_config.py::TestConfigTestEnv::test_factors_in_boolean tests/test_config.py::TestConfigTestEnv::test_factors_in_setenv tests/test_config.py::TestConfigTestEnv::test_factor_use_not_checked tests/test_config.py::TestConfigTestEnv::test_factors_groups_touch tests/test_config.py::TestConfigTestEnv::test_period_in_factor tests/test_config.py::TestConfigTestEnv::test_ignore_outcome tests/test_config.py::TestGlobalOptions::test_notest tests/test_config.py::TestGlobalOptions::test_verbosity tests/test_config.py::TestGlobalOptions::test_quiet[args0-0] tests/test_config.py::TestGlobalOptions::test_quiet[args1-1] tests/test_config.py::TestGlobalOptions::test_quiet[args2-2] tests/test_config.py::TestGlobalOptions::test_quiet[args3-3] tests/test_config.py::TestGlobalOptions::test_substitution_jenkins_default tests/test_config.py::TestGlobalOptions::test_substitution_jenkins_context tests/test_config.py::TestGlobalOptions::test_sdist_specification tests/test_config.py::TestGlobalOptions::test_env_selection tests/test_config.py::TestGlobalOptions::test_py_venv tests/test_config.py::TestGlobalOptions::test_default_environments tests/test_config.py::TestGlobalOptions::test_envlist_expansion tests/test_config.py::TestGlobalOptions::test_envlist_cross_product tests/test_config.py::TestGlobalOptions::test_envlist_multiline tests/test_config.py::TestGlobalOptions::test_minversion tests/test_config.py::TestGlobalOptions::test_skip_missing_interpreters_true tests/test_config.py::TestGlobalOptions::test_skip_missing_interpreters_false tests/test_config.py::TestGlobalOptions::test_defaultenv_commandline tests/test_config.py::TestGlobalOptions::test_defaultenv_partial_override tests/test_config.py::TestHashseedOption::test_default tests/test_config.py::TestHashseedOption::test_passing_integer tests/test_config.py::TestHashseedOption::test_passing_string tests/test_config.py::TestHashseedOption::test_passing_empty_string tests/test_config.py::TestHashseedOption::test_passing_no_argument tests/test_config.py::TestHashseedOption::test_setenv tests/test_config.py::TestHashseedOption::test_noset tests/test_config.py::TestHashseedOption::test_noset_with_setenv tests/test_config.py::TestHashseedOption::test_one_random_hashseed tests/test_config.py::TestHashseedOption::test_setenv_in_one_testenv tests/test_config.py::TestSetenv::test_getdict_lazy tests/test_config.py::TestSetenv::test_getdict_lazy_update tests/test_config.py::TestSetenv::test_setenv_uses_os_environ tests/test_config.py::TestSetenv::test_setenv_default_os_environ tests/test_config.py::TestSetenv::test_setenv_uses_other_setenv tests/test_config.py::TestSetenv::test_setenv_recursive_direct tests/test_config.py::TestSetenv::test_setenv_overrides tests/test_config.py::TestSetenv::test_setenv_with_envdir_and_basepython tests/test_config.py::TestSetenv::test_setenv_ordering_1 tests/test_config.py::TestSetenv::test_setenv_cross_section_subst_issue294 tests/test_config.py::TestSetenv::test_setenv_cross_section_subst_twice tests/test_config.py::TestSetenv::test_setenv_cross_section_mixed tests/test_config.py::TestIndexServer::test_indexserver tests/test_config.py::TestIndexServer::test_parse_indexserver tests/test_config.py::TestIndexServer::test_multiple_homedir_relative_local_indexservers tests/test_config.py::TestConfigConstSubstitutions::test_replace_pathsep_unix[:] tests/test_config.py::TestConfigConstSubstitutions::test_replace_pathsep_unix[;] tests/test_config.py::TestConfigConstSubstitutions::test_pathsep_regex tests/test_config.py::TestParseEnv::test_parse_recreate tests/test_config.py::TestCmdInvocation::test_help tests/test_config.py::TestCmdInvocation::test_version_simple tests/test_config.py::TestCmdInvocation::test_version_no_plugins tests/test_config.py::TestCmdInvocation::test_version_with_normal_plugin tests/test_config.py::TestCmdInvocation::test_version_with_fileless_module tests/test_config.py::TestCmdInvocation::test_listenvs_all_verbose_description tests/test_config.py::TestCmdInvocation::test_listenvs_all_verbose_description_no_additional_environments tests/test_config.py::TestCmdInvocation::test_config_specific_ini tests/test_config.py::TestCmdInvocation::test_override_workdir tests/test_config.py::TestCmdInvocation::test_showconfig_with_force_dep_version tests/test_config.py::test_env_spec[-e tests/test_config.py::TestCommandParser::test_command_parser_for_word tests/test_config.py::TestCommandParser::test_command_parser_for_posargs tests/test_config.py::TestCommandParser::test_command_parser_for_multiple_words tests/test_config.py::TestCommandParser::test_command_parser_for_substitution_with_spaces tests/test_config.py::TestCommandParser::test_command_parser_with_complex_word_set tests/test_config.py::TestCommandParser::test_command_with_runs_of_whitespace tests/test_config.py::TestCommandParser::test_command_with_split_line_in_subst_arguments tests/test_config.py::TestCommandParser::test_command_parsing_for_issue_10
changelog/740.feature.rst tox/config.py
changelog/740.feature.rst tox/config.py