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

TestUtils module #70

Open
willtebbutt opened this issue Aug 5, 2022 · 1 comment
Open

TestUtils module #70

willtebbutt opened this issue Aug 5, 2022 · 1 comment

Comments

@willtebbutt
Copy link
Collaborator

willtebbutt commented Aug 5, 2022

There's lots of useful testing utilities in test/common.jl. It would be helpful if these were moved inside src into a module called TestUtils (consistent with standard naming conventions), so that others implementing new NodeOps etc can make use of this functionality (e.g. I'm doing this right now, and thinking "I'd really like to be able to run that _eval function that gets used in the TimeDag tests so that I can be sure my op handles the batch_interval correctly....")

@tpgillam
Copy link
Owner

tpgillam commented Aug 5, 2022

We should definitely do this.

I think that doing #34 will be dependent on doing this (and associated test refactoring) first.

My rough takeaways from our meeting:

  • We should have a generic function that tests a given node, that dispatches on the type of NodeOp
  • Generic tests can be implemented for e.g. BinaryNodeOp, for which alignment semantics should apply.
  • In all cases we should verify that the necessary interface is implemented.
  • In the documentation we should refer to these tests as the "formal requirement" for ensuring that an interface has been implemented.

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

No branches or pull requests

2 participants