Skip to content

Tests for simulation reduction in upload() #2587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2025

Conversation

yaugenst-flex
Copy link
Collaborator

@yaugenst-flex yaugenst-flex commented Jun 20, 2025

tests for #2583 @momchil-flex

Greptile Summary

Added test coverage for simulation reduction during upload in test_webapi_mode.py and test_webapi_mode_sim.py.

  • Added parameterized test test_upload_with_reduction_parameter to verify simulation reduction behavior
  • Modified mock_upload fixture to track and expose uploaded simulation stubs for verification
  • Added test cases to validate simulation state when reduce_simulation=True and reduce_simulation=False

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Comment on lines +299 to +300
uploaded_sim = mock_upload["stub"].simulation
assert uploaded_sim == expected_sim
Copy link

Choose a reason for hiding this comment

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

style: Consider adding a failure message to the assertion to clarify the error when the test fails

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good suggestion in principle but in this test it's quite obvious what would be failing so not necessary I would say.

@yaugenst-flex yaugenst-flex merged commit cf98652 into momchil/reduce_mode Jun 20, 2025
31 checks passed
@yaugenst-flex yaugenst-flex deleted the yaugenst-flex/mock-reduce-test branch June 20, 2025 08:05
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.

2 participants