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

Unittesting template with filled projects #476

Merged
merged 14 commits into from Oct 19, 2021

Conversation

sudarsan-surendralal
Copy link
Member

@sudarsan-surendralal sudarsan-surendralal commented Oct 18, 2021

I think it is useful in many cases (Edit: For example #476) to have test case templates with a cls.project class attribute which already has a few jobs and sub projects. Here's a minimal implementation.

Copy link
Member

@liamhuber liamhuber left a comment

Choose a reason for hiding this comment

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

Yeah, I agree! Nice idea!

Some streamlining changes suggested.

pyiron_base/_tests.py Outdated Show resolved Hide resolved
pyiron_base/_tests.py Outdated Show resolved Hide resolved
pyiron_base/_tests.py Outdated Show resolved Hide resolved
pyiron_base/_tests.py Outdated Show resolved Hide resolved
pyiron_base/_tests.py Outdated Show resolved Hide resolved
Copy link
Member

@niklassiemer niklassiemer left a comment

Choose a reason for hiding this comment

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

I like the streamlining of ToyJob and the FilledProject test case! With Liams suggestions this lgtm.

Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
@sudarsan-surendralal
Copy link
Member Author

sudarsan-surendralal commented Oct 19, 2021

@liamhuber thanks for the suggestions. I've streamlined the ToyJob class originally used and defined by @pmrv separately for each module. I've now replaced all these class definitions with the common one. @pmrv hope this is okay?

@sudarsan-surendralal sudarsan-surendralal merged commit 4b5d0e2 into master Oct 19, 2021
@delete-merged-branch delete-merged-branch bot deleted the test_filled_proj branch October 19, 2021 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants