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

Addition of pytest case for not None values for frames and start/stop/step #4769

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Enhancements
(Issue #4673)
* enables parallelization for analysis.dssp.dssp.DSSP (Issue #4674)
* Enables parallelization for analysis.hydrogenbonds.hbond_analysis.HydrogenBondAnalysis (Issue #4664)
* Added pytest case to cover Raise errors cases frames and step/stop/step are present (Issue #4648)
talagayev marked this conversation as resolved.
Show resolved Hide resolved
* Improve error message for `AtomGroup.unwrap()` when bonds are not present.(Issue #4436, PR #4642)
* Add `analysis.DSSP` module for protein secondary structure assignment, based on [pydssp](https://github.com/ShintaroMinami/PyDSSP)
* Added a tqdm progress bar for `MDAnalysis.analysis.pca.PCA.transform()`
Expand Down
14 changes: 14 additions & 0 deletions testsuite/MDAnalysisTests/analysis/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,20 @@ def test_incompatible_n_workers(u):
with pytest.raises(ValueError):
FrameAnalysis(u).run(backend=backend, n_workers=3)


def test_frame_values_incompatability(u):
start, stop, step = 0, 4, 1
frames = [1, 2, 3, 4]

with pytest.raises(ValueError,
match="start/stop/step cannot be combined with frames"):
FrameAnalysis(u.trajectory).run(
frames=frames,
start=start,
stop=stop,
step=step
)

@pytest.mark.parametrize('run_class,backend,n_workers', [
(Parallelizable, 'not-existing-backend', 2),
(Parallelizable, 'not-existing-backend', None),
Expand Down
Loading