Skip to content

test: parametrize remaining repeated test shapes#88

Merged
dceoy merged 4 commits into
mainfrom
test/parametrize-dataframe-cases
Jul 2, 2026
Merged

test: parametrize remaining repeated test shapes#88
dceoy merged 4 commits into
mainfrom
test/parametrize-dataframe-cases

Conversation

@dceoy

@dceoy dceoy commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Refactor remaining repeated test shapes in tests/test_dataframe.py and tests/test_mt5.py to use pytest.mark.parametrize.

Changes

  • Combined copy_rates_from_as_df and copy_rates_range_as_df into one parametrized test using client_method, mt5_method, and call_kwargs.
  • Combined order_check_as_df and order_send_as_df into one parametrized test, preserving the request/result column assertions via mocker.MagicMock for the request/result rows.
  • Split test_get_methods_with_parameters into method_name × kwargs cases so group and ticket are separate cases per method (orders_get, positions_get).
  • Bumped package version to 1.0.3.

Design notes

  • Diff is minimal: each parametrize keeps the same call shape, mock setup, and assertions as the originals.
  • No broad helper abstractions for large mock rows; the order_action_as_df mock uses the same mocker.MagicMock approach as the existing order_action_as_dict test.
  • Existing test semantics preserved (column assertions, call shape, and validation paths).

QA

  • uv run ruff format
  • uv run ruff check
  • uv run pyright
  • uv run pytest — 324 passed, 33 skipped, 100% coverage
  • ./.agents/skills/local-qa/scripts/qa.sh — green

@dceoy dceoy self-assigned this Jul 2, 2026
@dceoy dceoy changed the title test: parametrize repeated dataframe cases test: parametrize remaining repeated test shapes Jul 2, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@dceoy dceoy marked this pull request as ready for review July 2, 2026 10:32

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No noteworthy issues found.

@opencode-agent

opencode-agent Bot commented Jul 2, 2026

Copy link
Copy Markdown

Posted a review on PR #88: No noteworthy issues found.

All seven review agents (code quality, performance, test coverage, documentation accuracy, security, project guidelines, and behavioral test analysis) reviewed the diff and returned no actionable findings. The review is live at #88 (review).

github run

@dceoy dceoy merged commit 4e00c05 into main Jul 2, 2026
8 checks passed
@dceoy dceoy deleted the test/parametrize-dataframe-cases branch July 2, 2026 13:21
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