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

Add tests for get_num_atoms exception raise in PSA (per issue #597) #4036

Closed
xhgchen opened this issue Feb 22, 2023 · 0 comments · Fixed by #4037
Closed

Add tests for get_num_atoms exception raise in PSA (per issue #597) #4036

xhgchen opened this issue Feb 22, 2023 · 0 comments · Fixed by #4037

Comments

@xhgchen
Copy link
Member

xhgchen commented Feb 22, 2023

Towards #597, this PR adds tests that check if get_num_atoms in PSAnalysis and Path raises a ValueError and displays "No path data"

Thanks for all the help, and please let me know if there is anything I can improve on!

Edit: added 2 new tests for psa.get_num_paths and psa.get_paths as I realized those functions needed similar testing. That should cover all the "no path data" type exceptions in the PSA module.

hmacdope pushed a commit that referenced this issue Mar 9, 2023
* Add tests for exception raise in PSA (per issue #597)

* Towards #597
* Checks that get_num_atoms in PSAnalysis and Path raises a ValueError
  and displays "No path data"

* Fix linting issues and add to AUTHORS

* Fix comments for clarity

* Make fixture for Universe and add paths tests

* Make universe1 = mda.Universe(PSF, DCD) a fixture
* Add similar tests to raise ValueErrors for get_num_paths
and get_paths
* Reorganize tests under class TestPSAExceptions

* Remove trailing whitespace

* Collapse tests into one test

* Add and revise comments for clarity

* Update CHANGELOG
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 a pull request may close this issue.

1 participant