Skip to content
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

Fix Napari relared tests fails #376

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adambasha0
Copy link

@adambasha0 adambasha0 commented Dec 30, 2024

Problem:

  • Deadlock which causes the test to hang during automated CI runs or during running tests using pytests in local env.
  • Cause of the error is probably due to synchronization issues with GUI events when running in a headless environment.
  • Using qtbot.wait(100), the test will wait first for GUI updates to complete. This will ensure that the viewer state is updated before assertions are made.

Fix:

  • Refactored the test to use qtbot to synchronize GUI events.
  • Removed the @pytest.mark.skipif condition for GITHUB_ACTIONS as the test should now run reliably in all environments.

@adambasha0 adambasha0 force-pushed the fix-Napari-related-tests-fail branch from 99040c2 to eae0d08 Compare December 30, 2024 19:11
@qin-yu
Copy link
Collaborator

qin-yu commented Dec 30, 2024

Thank you @adambasha0! But your CI log shows that tests for widgets are skipped.

tests/widgets/test_widget_open_file.py s
tests/widgets/test_widget_preprocessing.py sssssss

@adambasha0
Copy link
Author

Thank you @adambasha0! But your CI log shows that tests for widgets are skipped.

tests/widgets/test_widget_open_file.py s
tests/widgets/test_widget_preprocessing.py sssssss

Hi @qin-yu! Thank you, I did not notice this. I did run it manually, I do not know why it was skipped.

@qin-yu
Copy link
Collaborator

qin-yu commented Dec 31, 2024

I saw you re-ran it but the output is the same.

@adambasha0
Copy link
Author

adambasha0 commented Dec 31, 2024

I saw you re-ran it but the output is the same.

The CI is being run for modify-package-workflow-and-refactor-conda-environment (the other PR , the branch here is rebased to master branch)
I think it should be run for fix-Napari-related-tests-fail

@qin-yu
Copy link
Collaborator

qin-yu commented Jan 10, 2025

Hi @adambasha0 are you still trying? If not I'll close this PR.

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