Skip to content

feat: starting generic testing framework #150

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

henryiii
Copy link
Member

@henryiii henryiii commented Apr 9, 2025

Starting a generic testing helper framework. For a third party to test their implementation, they can subclass the provided UnitTest fixture and implement the required methods producing histograms.

Thoughts so far:

  • I could make this a Mixin, which would workaround a possible issue with discovery if you import it directly into your test file instead of keeping a dotted name. But then typing is trickier, so I haven't done that (yet).
  • I could provide the suggested data contents. I think this might ideally follow serialization.
  • This uses unittest not just because that avoids a dependency, but also because pytest won't rewrite an assert that's not in a test file. It can be run with pytest and still prints nicely.

Closes #133.

Signed-off-by: Henry Schreiner <[email protected]>

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
@henryiii henryiii force-pushed the henryiii/feat/tester branch from d07cae4 to 268db8a Compare April 14, 2025 19:28
@henryiii henryiii requested a review from Copilot April 14, 2025 19:44
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.

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • docs/indexing.rst: Language not supported

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.

Implementation independent tests?
1 participant