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

Add info on testing QWidget visibility #370

Merged
merged 5 commits into from
Mar 14, 2024
Merged

Conversation

lucyleeow
Copy link
Collaborator

@lucyleeow lucyleeow commented Mar 9, 2024

References and relevant issues

Follow on from napari/napari#6722

Description

@lucyleeow
Copy link
Collaborator Author

cc @DragaDoncila @Czaki @dalthviz

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Mar 9, 2024

## Running tests

To run our test suite locally, run `pytest` on the command line. If, for some reason
you don't already have the test requirements in your environment, run `python -m pip install -e .[testing]`.

There are a very small number of tests (<5) that require showing GUI elements, (such
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hahahaha

@dalthviz
Copy link
Member

Looks good to me! 👍

Copy link
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

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

Love it 🎉 ! This is great. This whole guide is pretty useful... I wonder how many people know it's there 😬

docs/developers/contributing/testing.md Outdated Show resolved Hide resolved
Pytest fixtures to aid testings live in:

* [`napari/conftest.py`](https://github.com/napari/napari/blob/main/napari/conftest.py)
* [`napari_builtins/_tests/conftest.py`](https://github.com/napari/napari/blob/main/napari_builtins/_tests/conftest.py)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put this separately and mention that it's fixtures for the builtins plugin

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do, but I think we need a section describing what the builtins plugin is. see: #321

* [`napari_builtins/_tests/conftest.py`](https://github.com/napari/napari/blob/main/napari_builtins/_tests/conftest.py)
* [`napari/utils/_testsupport.py`](https://github.com/napari/napari/blob/main/napari/utils/_testsupport.py)

These fixtures from are available globally to all of `napari`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the napari_builtins ones are available to napari tests (or vice versa) as they are in separate directories

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

docs/developers/contributing/testing.md Outdated Show resolved Hide resolved
@Czaki Czaki added this to the 0.5.0 milestone Mar 12, 2024
@lucyleeow
Copy link
Collaborator Author

Thanks for review @DragaDoncila, changes made!

Copy link
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

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

Awesome, thank you @lucyleeow 🙏

@psobolewskiPhD psobolewskiPhD merged commit d55997e into napari:main Mar 14, 2024
6 checks passed
@lucyleeow lucyleeow deleted the test branch March 14, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants