8000 Test openNextImg and openPrevImg methods in labelme.app.MainWindow by wkentaro · Pull Request #1575 · wkentaro/labelme · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Test openNextImg and openPrevImg methods in labelme.app.MainWindow #1575

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
Apr 1, 2025

Conversation

wkentaro
Copy link
Owner
@wkentaro wkentaro commented Apr 1, 2025

The existing one doesn't use prev and not enough.

@wkentaro wkentaro requested a review from Copilot April 1, 2025 11:03
@wkentaro wkentaro self-assigned this Apr 1, 2025
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new GUI test to validate the behavior of the openNextImg and openPrevImg methods in labelme.app.MainWindow. It replaces individual tests with a combined test that checks the boundary condition when attempting to go to a previous image from the first image and then validates navigating forward and back.

Comments suppressed due to low confidence (2)

tests/labelme_tests/test_app.py:76

  • Consider using 'qtbot.wait_until' with an appropriate condition rather than a fixed wait time to more reliably wait for the GUI to update.
qtbot.wait(100)

tests/labelme_tests/test_app.py:65

  • [nitpick] Consider splitting this combined test into two separate tests for openNextImg and openPrevImg to isolate failures and provide clearer test diagnostics.
def test_MainWindow_openNextAndPrevImg(qtbot: QtBot) -> None:

The existing one doesn't use prev and not enough.
@wkentaro wkentaro force-pushed the fix_test_of_opening_next_and_previous_images branch from 2465fca to 409e006 Compare April 1, 2025 11:56
@wkentaro wkentaro requested a review from Copilot April 1, 2025 11:57
Copilot

This comment was marked as resolved.

@wkentaro wkentaro requested a review from Copilot April 1, 2025 11:57
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new test to verify the behavior of openNextImg and openPrevImg methods in labelme.app.MainWindow. The key changes include:

  • Adding test_MainWindow_openNextAndPrevImg to test sequential image navigation.
  • Removing individual tests for openNextImg and openPrevImg in favor of a combined test.
Comments suppressed due to low confidence (1)

tests/labelme_tests/test_app.py:76

  • Consider replacing the fixed wait(100) with qtbot.wait_until to more robustly synchronize on the expected state change.
qtbot.wait(100)

@wkentaro wkentaro merged commit 0ea3e8e into main Apr 1, 2025
3 checks passed
@wkentaro wkentaro deleted the fix_test_of_opening_next_and_previous_images branch April 1, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0