Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:python
python-anyio3
tests-test_fileio.py-don-t-follow-symlinks-in-d...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tests-test_fileio.py-don-t-follow-symlinks-in-dev.patch of Package python-anyio3
From: Jiri Slaby <jirislaby@gmail.com> Date: Thu, 2 Nov 2023 11:37:44 +0100 Subject: tests: test_fileio.py: don't follow symlinks in /dev Patch-mainline: submitted https://github.com/agronholm/anyio/pull/626 References: fix for kernel 6.6 There might be a broken one like /dev/log and this causes the tests to fail. This is highly is unpredictable, because os.scandir() sometimes returns a block device, sometimes the broken link is hit. So pass follow_symlinks=False to entry.stat(). --- tests/test_fileio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_fileio.py b/tests/test_fileio.py index 9e6b2a8325..c4801187db 100644 --- a/tests/test_fileio.py +++ b/tests/test_fileio.py @@ -218,7 +218,7 @@ class TestPath: assert not await Path("/btelkbee").is_block_device() with os.scandir("/dev") as iterator: for entry in iterator: - if stat.S_ISBLK(entry.stat().st_mode): + if stat.S_ISBLK(entry.stat(follow_symlinks=False).st_mode): assert await Path(entry.path).is_block_device() break else: -- 2.42.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor