Modernize project with uv, pytest, ruff, and git hooks #21

Merged
genewildish merged 5 commits from enhance_portability into main 2026-03-15 23:21:36 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 9ae4dc2b07 - Show all commits

View File

@@ -16,7 +16,7 @@ import json
import threading import threading
import time import time
import urllib.request import urllib.request
from urllib.parse import urlparse, parse_qs, urlencode, urlunparse from urllib.parse import parse_qs, urlencode, urlparse, urlunparse
class NtfyPoller: class NtfyPoller:

View File

@@ -15,15 +15,15 @@ class TestNtfyPollerInit:
"""Default values are set correctly.""" """Default values are set correctly."""
poller = NtfyPoller("http://example.com/topic") poller = NtfyPoller("http://example.com/topic")
assert poller.topic_url == "http://example.com/topic" assert poller.topic_url == "http://example.com/topic"
assert poller.poll_interval == 15 assert poller.reconnect_delay == 5
assert poller.display_secs == 30 assert poller.display_secs == 30
def test_init_custom_values(self): def test_init_custom_values(self):
"""Custom values are set correctly.""" """Custom values are set correctly."""
poller = NtfyPoller( poller = NtfyPoller(
"http://example.com/topic", poll_interval=5, display_secs=60 "http://example.com/topic", reconnect_delay=10, display_secs=60
) )
assert poller.poll_interval == 5 assert poller.reconnect_delay == 10
assert poller.display_secs == 60 assert poller.display_secs == 60