Skip to content

tests: skip tz tests where time.tzset() is missing, not just on windows - #10279

Merged
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
ThomasWaldmann:haiku-tzset-skip
Aug 29, 2026
Merged

tests: skip tz tests where time.tzset() is missing, not just on windows#10279
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
ThomasWaldmann:haiku-tzset-skip

Conversation

@ThomasWaldmann

Copy link
Copy Markdown
Member

test_match_bare_pattern_uses_local_timezone was skipped based on is_win32, with "time.tzset() is not available on Windows" as the reason. Windows is not the only platform without time.tzset — haiku's python has none either, so the test failed there (AttributeError: module 'time' has no attribute 'tzset') and its teardown errored on the same call.

Skip on the actual reason instead: not hasattr(time, "tzset"). This covers Windows exactly as before, plus any other platform whose python lacks it. The now-unused is_win32 import goes away with it.

Split out of the haiku CI work in #10249, since it is not haiku-specific.

🤖 Generated with Claude Code

haiku's python has no time.tzset either, so the local-timezone tests
failed there (and their teardown errored). Skip on the actual reason
rather than on the platform.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.48%. Comparing base (8b53d45) to head (5fb717a).
⚠️ Report is 21 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10279      +/-   ##
==========================================
- Coverage   87.48%   87.48%   -0.01%     
==========================================
  Files         103      103              
  Lines       18534    18540       +6     
  Branches     2843     2844       +1     
==========================================
+ Hits        16215    16219       +4     
- Misses       1623     1624       +1     
- Partials      696      697       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann
ThomasWaldmann merged commit 979cfbc into borgbackup:master Aug 29, 2026
23 checks passed
@ThomasWaldmann
ThomasWaldmann deleted the haiku-tzset-skip branch August 29, 2026 16:42
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