Skip to content

Add pytest coverage for indicator windows, column syntax and static helpers (129 tests) - #211

Open
wxs-lang wants to merge 5 commits into
jealous:masterfrom
wxs-lang:master
Open

wxs-lang wants to merge 5 commits into
jealous:masterfrom
wxs-lang:master

Conversation

@wxs-lang

Copy link
Copy Markdown

The whole pure-logic surface here is a single 2,331-line module served by one test file that also carries a network-dependent Yahoo Finance class. This adds 129 tests in four new files under a new tests/ directory (no clash with the root-level test.py), all using synthetic frames and direct helper calls — no network, no CSV fixtures. Covered: the _Meta window parsing and column-name syntax (close_5_dma, close_1~3_max, cross/compare columns), the static helpers, indicator behavior on flat/rising/falling series, and custom windows plus edge cases like empty and single-row frames. No production code changed. A few quirks found while probing are pinned as-is with a comment, e.g. roc() not guarding division by zero, and bare eri/wt raising KeyError while still creating sibling columns.

Checked locally: the new tests pass (129 passed); the pre-existing suite passes too (133 passed) with the 4 Yahoo Finance tests deselected since they download live data.

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