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

gh-273: add tests for glass.shells #449

Merged
merged 47 commits into from
Jan 24, 2025
Merged

gh-273: add tests for glass.shells #449

merged 47 commits into from
Jan 24, 2025

Conversation

paddyroddy
Copy link
Member

@paddyroddy paddyroddy commented Nov 21, 2024

Closes #273. Adds tests for the glass.shells module. Coverage going up - 94.1%.

Worked on this before the pause. Can't remember where I got to, but makes sense to merge. We can always improve the tests later.

@paddyroddy paddyroddy added enhancement New feature or request testing Work is related to testing labels Nov 21, 2024
@paddyroddy paddyroddy self-assigned this Nov 21, 2024
This makes them available to all tests. I need `cosmo` for use in #449.

Have also added `scope="session"` so they are only computed once when
testing rather than multiple times.
@paddyroddy paddyroddy changed the base branch from main to paddy/issue-450 November 22, 2024 10:33
Base automatically changed from paddy/issue-450 to main November 25, 2024 10:09
Base automatically changed from paddy/issue-456 to main November 26, 2024 12:26
@paddyroddy paddyroddy marked this pull request as ready for review January 23, 2025 13:41
Copy link
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

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

Thanks, @paddyroddy! I have made some comments about using assert instead of np.testing functions on non-array values. I am not sure if there was a reason to use np.testing for these test case; ignore my comments if there was one.

tests/test_shells.py Outdated Show resolved Hide resolved
tests/test_shells.py Outdated Show resolved Hide resolved
tests/test_shells.py Outdated Show resolved Hide resolved
tests/test_shells.py Outdated Show resolved Hide resolved
tests/test_shells.py Outdated Show resolved Hide resolved
tests/test_shells.py Outdated Show resolved Hide resolved
tests/test_shells.py Outdated Show resolved Hide resolved
tests/test_shells.py Outdated Show resolved Hide resolved
tests/test_shells.py Outdated Show resolved Hide resolved
tests/test_shells.py Outdated Show resolved Hide resolved
@paddyroddy
Copy link
Member Author

Thanks, @paddyroddy! I have made some comments about using assert instead of np.testing functions on non-array values. I am not sure if there was a reason to use np.testing for these test case; ignore my comments if there was one.

I guess this is a habit of mine since I learnt about numpy.testing., but maybe it doesn't make too much sense?

paddyroddy and others added 13 commits January 23, 2025 15:29
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
@paddyroddy paddyroddy merged commit e9982cc into main Jan 24, 2025
7 of 9 checks passed
@paddyroddy paddyroddy deleted the paddy/issue-273 branch January 24, 2025 15:41
@Saransh-cpp
Copy link
Member

Sorry for the late reply. I guess it was just the extra function call overheads, but not a big deal, both of the implementations look good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing Work is related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add/review tests for glass.shells
2 participants