Skip to content

Increase test coverage across core, platform, UI, IPC, and applet modules#199

Open
edumucelli wants to merge 3 commits into
masterfrom
improve_test_coverage
Open

Increase test coverage across core, platform, UI, IPC, and applet modules#199
edumucelli wants to merge 3 commits into
masterfrom
improve_test_coverage

Conversation

@edumucelli

Copy link
Copy Markdown
Owner

Summary

Increases project test coverage from 89% to 90% (3,711 to 3,884 tests, 269 previously uncovered lines now covered).

Module improvements

Module Before After
config.py 94% 100%
tooltip.py 94% 100%
items_service.py 81% 100%
theme/theme.py 95% 100%
theme/migration.py 91% 99%
recent_docs.py 0% 100%
caffeine/inhibit.py 39% 99%
settings.py 93% 96%
base.py 86% 92%
diagnostics.py 18% 49%
update_popup.py 25% 46%

What was covered

  • config.py: Normalization edge cases, GLib.Error paths, recent apps validation, cleanup failure handlers
  • tooltip.py: Timestamp parsing (ISO/Z-suffix/invalid), relative time labels, recent item tooltip formatting, TypeError handling for transient-for
  • items_service.py: D-Bus start/stop edge cases, bus registration failures, signal debouncing, argument validation, pin/unpin state checks
  • theme modules: Migration edge cases (path set/pop, backup cleanup failures, atomic write error recovery), indicator style fallback
  • recent_docs.py: Full test suite for document-to-app association (filtering by local/exists/has_application, sorting by modification time, limit enforcement)
  • settings.py: Recent apps/docs toggle behavior, binding edge cases (sync guards, None values, duplicate values), runtime callbacks
  • diagnostics.py: Static methods (status symbols, yes/no helpers), controller init/destroy, current report collection, feature/check row building
  • update_popup.py: Controller lifecycle (start scheduling, hide/dismiss actions), remind later, ignore version, URL opening
  • caffeine/inhibit.py: ScreenSaverInhibitor DBus acquire/release (all targets fail, GLib.Error handling), SystemdSleepInhibitor subprocess handling (OSError, timeout, kill), CompositeInhibitor edge cases
  • base.py: Default hook no-ops, icon source guards, popup anchor, drop URI defaults, font fitting fallthrough
  • model: 9 integration tests for recent apps flow (launch-close-recent-pin lifecycle)

Files changed

  • Modified 8 existing test files
  • Added 4 new test files (recent_docs, diagnostics_ui, update_popup, integration/recent_apps_flow)
  • +2,490 lines of test code

- config.py: 94% → 100% — normalization, validation, edge cases
- tooltip.py: 94% → 100% — timestamp parsing, relative time, recent items
- items_service.py: 81% → 100% — D-Bus service lifecycle, error paths
- theme/migration.py: 91% → 99% — migration edge cases, cleanup failures
- theme/theme.py: 95% → 100% — indicator style fallback, backfill errors
- recent_docs.py: 0% → 100% — document-to-app association
- settings.py: 93% → 96% — recent apps/docs controls, binding edge cases
- diagnostics.py: 18% → 49% — static methods, controller logic
- update_popup.py: 25% → 46% — controller lifecycle, dismiss actions
- model: integration tests for recent apps flow

Overall: 89% → 90% (3,855 tests, 302 uncovered lines covered)
- base.py: 86% -> 92% — default hook coverage, icon source guards,
  popup anchor, drop URIs, font fitting fallthrough
- caffeine/inhibit.py: 39% -> 99% — ScreenSaverInhibitor DBus acquire/
  release paths, SystemdSleepInhibitor subprocess handling,
  CompositeInhibitor edge cases
@netlify

netlify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploy Preview for dockingbar canceled.

Name Link
🔨 Latest commit 6616c04
🔍 Latest deploy log https://app.netlify.com/projects/dockingbar/deploys/6a35dcfc2783900008c674bf

Use keyword arguments (domain='g-io-error-quark', code=0) instead of
positional int arguments to avoid ValueError in GLib.Error.__str__
on Python 3.13 / openSUSE.
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