fix(tests): five rfdetr-seg static-crop tests shadow each other by name - #2948
Merged
PawelPeczek-Roboflow merged 2 commits intoSep 11, 2026
Conversation
…heir fixture
test_rfdetr_seg_predictions_onnx.py has three blocks of static-crop package
tests - stretch, letterbox and center-crop - built by copying the previous
block. The center-crop block kept the letterbox names:
line 938 test_package_with_static_crop_letterbox_against_numpy_input
... snakes_rfdetr_seg_onnx_static_bs_static_crop_letterbox_package
line 1088 test_package_with_static_crop_letterbox_against_numpy_input
... snakes_rfdetr_seg_onnx_static_bs_static_crop_center_crop_package
and likewise for _numpy_list_input, _torch_input, _torch_list_input and
_torch_batch_input. Since pytest collects module attributes, the second
definition of each name replaces the first: all five letterbox tests have
silently not been collected, and the five center-crop tests were reported
under a letterbox name.
Rename the five center-crop definitions to
test_package_with_static_crop_center_crop_* so both blocks are collected. This
is a pure rename - no fixture, marker, body or assertion is touched.
Signed-off-by: Tai An <antai12232931@outlook.com>
Anai-Guo
requested review from
PawelPeczek-Roboflow,
dkosowski87,
grzegorz-roboflow,
hansent,
probicheaux,
rafel-roboflow and
yeldarby
as code owners
September 8, 2026 10:27
PawelPeczek-Roboflow
approved these changes
Sep 11, 2026
|
|
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
inference_models/tests/integration_tests/models/test_rfdetr_seg_predictions_onnx.pyhas three blocks of static-crop package tests — stretch, letterbox and center-crop — each written by copying the previous one. The center-crop block kept the letterbox names:test_package_with_static_crop_letterbox_against_numpy_input..._static_crop_letterbox_packagetest_package_with_static_crop_letterbox_against_numpy_input..._static_crop_**center_crop**_package…and the same for
_numpy_list_input,_torch_input,_torch_list_inputand_torch_batch_input— five collisions in total.pytest collects module attributes, so for each of those five names the second definition replaces the first. Net effect:
Checkable without running the suite (it needs GPU/ONNX extras):
Change
Rename the five center-crop definitions to
test_package_with_static_crop_center_crop_*, matching the fixture each one requests. Pure rename — no fixture, marker, body or assertion is touched, and the new names do not collide with the existing (non-static-crop)test_package_with_center_crop_*tests.These tests are
@pytest.mark.slow @pytest.mark.onnx_extrasand need a GPU/ONNX environment I do not have, so I could not execute them here. The five letterbox tests are being collected for the first time — if their expected boxes/mask areas need refreshing, I'm happy to update them in this PR.One thing I left alone
The same script also reports
test_package_with_static_crop_stretch_against_numpy_inputtwice (lines 701 and 905). Those two use the same fixture and the same call but assert different boxes and mask bounds, so only a maintainer can say which one is current — I did not want to guess, and it is a separate concern from the letterbox/center-crop mix-up.🤖 Generated with Claude Code