Skip to content

Tests fail on Windows due to NamedTemporaryFile locking behavior #676

Description

@athifmuhammad1001-svg

Description

Several tests fail on Windows because tempfile.NamedTemporaryFile()
locks the file while open, preventing other processes from reading it.
This works fine on Mac/Linux but not Windows.

Failing Tests

  • test_client_generate_images
  • test_client_create_blob
  • test_client_create_blob_exists
  • test_async_client_generate_images
  • test_async_client_create_blob
  • test_async_client_create_blob_exists
  • test_image_serialization_path
  • test_image_serialization_string_path

Environment

  • OS: Windows
  • Python: 3.14.3

Error

PermissionError: [Errno 13] Permission denied: 'C:\Users...\Temp\tmp...'

Proposed Fix

Add delete=False to NamedTemporaryFile() calls in the affected tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions