The test suite does not run to completion on Windows

Author: NickAme03Created Jul 31, 2026Updated Jul 31, 2026

test.yml carries os: [ubuntu-latest, macos-latest], with a commented-out line right above it that also listed windows-latest. Putting Windows back next to Linux on Python 3.12 gives 9 failed, 722 passed, while the same run is fully green on Ubuntu: https://github.com/NickAme03/Claude-Code-Usage-Monitor/actions/runs/30659125218

The failures fall into three groups, and none of them is a bug in the program.

signal.pause is missing (3 tests). test_cli_main.py::TestMain::test_successful_main_execution, test_live_official_overlay.py::test_live_rich_tui_receives_official_snapshot_without_machine_consumers, test_terminal_title.py::test_live_monitoring_sets_terminal_title_from_snapshot.

locale.nl_langinfo is missing (3 tests). The three test_time_utils.py::TestTimeFormatDetector::test_detect_from_locale_* cases.

POSIX path assumptions (3 tests). Two in test_data_reader.py assert '.claude/projects' in path_str, which on Windows is C:\Users\...\.claude\projects. One in test_settings.py asserts namespace.log_file == "/tmp/test.log" against \tmp\test.log.

The production code already handles the first two. cli/main.py wraps signal.pause() in try/except AttributeError with a busy-wait fallback and a comment naming Windows, and utils/time_utils.py wraps the nl_langinfo calls in try/except Exception returning a default. So the program runs on Windows; it is the tests that assert on APIs the platform does not provide, rather than on the behaviour the fallbacks produce.

Scale, so you can weigh it: 9 out of 731, and none of them changes a number the monitor reports. What it costs is that a contributor on Windows cannot run the suite to completion and tell their own breakage apart from the pre-existing one.

I have not opened a pull request because the fix is a design decision rather than a repair: those tests could assert on the fallback path instead of the POSIX one, or be skipped on Windows with pytest.mark.skipif. The two are not equivalent, and the first is the only one that would actually cover Windows behaviour. Happy to implement whichever you prefer.

Source: Maciek-roboblog/Claude-Code-Usage-Monitor