Add image test using nbval and nbdime by ianthomas23 · Pull Request #32 · ipython/matplotlib-inline · GitHub
Skip to content

Add image test using nbval and nbdime#32

Merged
martinRenou merged 5 commits intoipython:mainfrom
ianthomas23:add_test
Jun 5, 2024
Merged

Add image test using nbval and nbdime#32
martinRenou merged 5 commits intoipython:mainfrom
ianthomas23:add_test

Conversation

@ianthomas23
Copy link
Copy Markdown
Collaborator

This PR adds tests to the project to confirm that the inline backend is used even if not specified using the %matplotlib magic and that images are correctly produced. It uses a single notebook for this, and nbval and nbdime to do the actual testing so the additions here are minimal. Essentially nbval runs the notebook and checks that the output cells are the same as those contained within the test notebook but ignores images. nbdime adds image comparison. Text is excluded from the plots, as usually occurs in Matplotlib tests, as text rendering can vary slightly on different platforms.

The original test to confirm the import works are now in a new file test_import.py.

I have also changed the installation of dependencies to just use PyPI rather than mamba as this should be simpler and faster, but I can switch this back if preferred.

@ianthomas23 ianthomas23 force-pushed the add_test branch 3 times, most recently from 3b5cb7d to 73422c2 Compare March 11, 2024 10:22
@martinRenou
Copy link
Copy Markdown
Collaborator

@ianthomas23
Copy link
Copy Markdown
Collaborator Author

Copy link
Copy Markdown
Collaborator

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

Thanks!

@martinRenou martinRenou merged commit 90034cf into ipython:main Jun 5, 2024
@ianthomas23 ianthomas23 deleted the add_test branch July 29, 2025 10:55
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