Skip to content

Commit 00d1016

Browse files
authored
fix(tests): skip test_staticfiles_filename_too_long on Windows where os.pathconf is unavailable (#3386)
1 parent d96887e commit 00d1016

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tests/test_staticfiles.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ def test_staticfiles_null_byte_in_path(tmpdir: Path, test_client_factory: TestCl
472472
assert response.status_code == 404
473473

474474

475+
@pytest.mark.skipif(not hasattr(os, "pathconf"), reason="os.pathconf is Unix-only")
475476
def test_staticfiles_filename_too_long(tmpdir: Path, test_client_factory: TestClientFactory) -> None:
476477
routes = [Mount("/", app=StaticFiles(directory=tmpdir), name="static")]
477478
app = Starlette(routes=routes)

0 commit comments

Comments
 (0)