Skip to content

Tests: a moment too long to be a step is refused before it is converted - #39

Merged
tmoosting merged 1 commit into
mainfrom
long-moment-case
Nov 23, 2026
Merged

tmoosting merged 1 commit into
mainfrom
long-moment-case

Conversation

@tmoosting

Copy link
Copy Markdown
Member

Tests only, no change to the package's code.

An address followed by @ and a run of more than 4,300 digits would make int() raise a plain ValueError, which find_ow_links, read_ow_link_at and the readers built on them do not catch. parse_ow_link reads the run's length before converting it, so the text is read as an address with no moment. No test held that check: with it taken out, every other test in tests/test_address.py still passed.

Four cases (12 digits, 4,301 with and without a minus, 100,000) now hold it for parse_ow_link, read_ow_link_at and find_ow_links. With the length check removed, three of the four fail with ValueError.

🤖 Generated with Claude Code

An address followed by @ and a run of more than 4,300 digits would make
int() raise a plain ValueError, which find_ow_links, read_ow_link_at and
the readers built on them do not catch. parse_ow_link reads the run's
length first, and until now no test held that: with the length check
taken out, every other test in tests/test_address.py still passed. Four
cases (12 digits, 4,301 with and without a minus, 100,000) hold it for
parse_ow_link, read_ow_link_at and find_ow_links. No change to the
package's code.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@tmoosting
tmoosting merged commit 800c0da into main Nov 23, 2026
11 checks passed
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