Skip to content

Fix CI failures by updating OSError handling in test finalizers#477

Open
Harishmcw wants to merge 1 commit intobastibe:masterfrom
Harishmcw:win_arm64
Open

Fix CI failures by updating OSError handling in test finalizers#477
Harishmcw wants to merge 1 commit intobastibe:masterfrom
Harishmcw:win_arm64

Conversation

@Harishmcw
Copy link

This PR fixes the CI failures on Windows builds.

The Problem

  • The test suite was passing on windows-2022 but failing on windows-latest because GitHub updated the latter to Windows Server 2025. On this newer image, closing an invalid file descriptor now fails silently instead of raising an OSError. Since the test strictly expected a crash via pytest.raises(OSError), the lack of an exception caused a test failure.

The Soultion

  • Updated the finalizer in tests/test_soundfile.py to use a try/except block. This ensures the file is closed if still open, but allows the test to pass if the OS handles the closure silently or if the library has already disposed of the resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant