Skip to content

Windows: test_os.test_stat_inaccessible_file() fails if run as an administrator #114435

Closed
@vstinner

Description

@vstinner

When test_os is run as an administrator, like running tests in a SSH shell for example, the test fails:

FAIL: test_stat_inaccessible_file (test.test_os.Win32NtTests.test_stat_inaccessible_file)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\victor\python\main\Lib\test\test_os.py", line 3134, in test_stat_inaccessible_file
    self.assertEqual(0, stat2.st_dev)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
AssertionError: 0 != 10298252993199238233

The test was added recently by commit ed06648 of issue gh-111877.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowstestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions