feat: add --my-tasks mode for open assigned issues (#71)
List open Redmine issues assigned to the current (or overridden) user, sorted by priority rank (P1..P5) then version due date with a stable id tie-break. Renders an OSC 8 hyperlinked console table on stdout and a counts/hours summary line on stderr; version due dates are fetched once per unique version, unavailable versions degrade to an empty due date. Also migrates the codebase to ruff 0.17.3 defaults (PEP 585/604 annotations, targeted noqa for intentional blind excepts and CLI root logging). Behavior-neutral: 408 tests pass with -W error.
This commit is contained in:
@@ -110,3 +110,21 @@ def test_get_version_falls_back_to_str_when_no_name():
|
||||
fixed_version = MockVersionNoName()
|
||||
|
||||
assert get_version(MockIssue()) == "fallback-id"
|
||||
|
||||
|
||||
def test_get_version_custom_default():
|
||||
"""Явный default заменяет <N/A>, когда версия не назначена."""
|
||||
|
||||
class MockIssue:
|
||||
pass
|
||||
|
||||
assert get_version(MockIssue(), default="") == ""
|
||||
|
||||
|
||||
def test_get_version_custom_default_not_used_when_version_present():
|
||||
"""При наличии версии default не применяется."""
|
||||
|
||||
class MockIssue:
|
||||
fixed_version = "v1.0"
|
||||
|
||||
assert get_version(MockIssue(), default="") == "v1.0"
|
||||
|
||||
Reference in New Issue
Block a user