Skip to content

Some tests fail on windows in AzureCI #110644

Closed

Description

@sobolevn

Bug report

0:00:16 load avg: 15.12 [ 24/469/1] test_re failed (env changed)
D:\a\1\s\Lib\test\support\os_helper.py:531: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\a\\1\\s\\build\\test_python_464�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_464�'
  with temp_dir(path=name, quiet=quiet) as temp_path:
D:\a\1\s\Lib\test\support\os_helper.py:532: RuntimeWarning: tests may fail, unable to change the current working directory to 'D:\\a\\1\\s\\build\\test_python_464�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_464�'
  with change_cwd(temp_path, quiet=quiet) as cwd_dir:
0:00:17 load avg: 15.15 [ 27/469/2] test_scope failed (env changed)
D:\a\1\s\Lib\test\support\os_helper.py:531: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\a\\1\\s\\build\\test_python_2168�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_2168�'
  with temp_dir(path=name, quiet=quiet) as temp_path:
D:\a\1\s\Lib\test\support\os_helper.py:532: RuntimeWarning: tests may fail, unable to change the current working directory to 'D:\\a\\1\\s\\build\\test_python_2168�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_2168�'
  with change_cwd(temp_path, quiet=quiet) as cwd_dir:
0:00:19 load avg: 15.19 [ 29/469/3] test_wmi failed (env changed)
D:\a\1\s\Lib\test\support\os_helper.py:531: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\a\\1\\s\\build\\test_python_7112�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_7112�'
  with temp_dir(path=name, quiet=quiet) as temp_path:
D:\a\1\s\Lib\test\support\os_helper.py:532: RuntimeWarning: tests may fail, unable to change the current working directory to 'D:\\a\\1\\s\\build\\test_python_7112�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_7112�'
  with change_cwd(temp_path, quiet=quiet) as cwd_dir:
0:00:37 load avg: 13.90 [ 46/469/5] test_zipfile failed (env changed) -- running (1): test_logging (35.1 sec)
D:\a\1\s\Lib\test\support\os_helper.py:531: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\a\\1\\s\\build\\test_python_5692�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_5692�'
  with temp_dir(path=name, quiet=quiet) as temp_path:
D:\a\1\s\Lib\test\support\os_helper.py:532: RuntimeWarning: tests may fail, unable to change the current working directory to 'D:\\a\\1\\s\\build\\test_python_5692�': [WinError 3] The system cannot find the path specified: 'D:\\a\\1\\s\\build\\test_python_5692�'
  with change_cwd(temp_path, quiet=quiet) as cwd_dir:

and maybe others.

https://dev.azure.com/Python/cpython/_build/results?buildId=140268&view=logs&j=0fcf9c9b-89fc-526f-8708-363e467e119e&t=bd551f17-1f0d-5946-45f1-d677b25fe3f7

Activity

  1. added
    type-bug
    tests
    on Oct 10, 2023
  2. zooba commented on Oct 16, 2023

    @zooba
    Member

    Wild guess without looking any closer: maybe a previous test has created a file with TESTFN, which then prevents the OS from creating a directory with the same name. I don't remember exactly what the error code is for that situation, but I'm pretty sure it's a not very obvious one.

  3. zooba commented on Oct 16, 2023

    @zooba
    Member

    Or possibly (and maybe more likely), nobody is creating the build directory D:\a\1\s\build\.

    If it can be easily overridden, I'd set the test working directory to $(Build.BinariesDirectory) anyway (or maybe a subdirectory), but that's a minor aside. If not every test is creating the directory, then you'll get failures like this that vary based on the order they run in.

  4. StanFromIreland commented on Oct 5, 2025

    @StanFromIreland
    Member

    Triage: I don't see such fails any more, test_profiling is flaky but otherwise green, e.g. this run. Can this be closed?

  5. added
    pending
    on Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowspendingteststype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions