Skip to content

Commit

Permalink
Update test_align.py
Browse files Browse the repository at this point in the history
fixing pep
  • Loading branch information
talagayev authored Oct 18, 2024
1 parent 0022b71 commit 2457c74
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions testsuite/MDAnalysisTests/analysis/test_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,12 @@ def test_alignto_partial_universe(self, universe, reference):
rtol=0, atol=1.5e-3)


def _get_aligned_average_positions(ref_files, ref, select="all", **kwargs, client_AlignTraj):
def _get_aligned_average_positions(
ref_files, ref, select="all", **kwargs, client_AlignTraj
):
u = mda.Universe(*ref_files, in_memory=True)
prealigner = align.AlignTraj(u, ref, select=select, **kwargs).run(**client_AlignTraj)
prealigner = align.AlignTraj(u, ref, select=select,
**kwargs).run(**client_AlignTraj)
ag = u.select_atoms(select)
reference_coordinates = u.trajectory.timeseries(asel=ag).mean(axis=1)
rmsd = sum(prealigner.results.rmsd/len(u.trajectory))
Expand All @@ -465,9 +468,13 @@ def universe(self):
def reference(self):
return mda.Universe(PSF, CRD)

def test_average_structure_deprecated_attrs(self, universe, reference, client_AverageStructure):
def test_average_structure_deprecated_attrs(
self, universe, reference, client_AverageStructure
):
# Issue #3278 - remove in MDAnalysis 3.0.0
avg = align.AverageStructure(universe, reference).run(stop=2, **client_AverageStructure)
avg = align.AverageStructure(universe, reference).run(stop=2,
**client_AverageStructure
)

wmsg = "The `universe` attribute was deprecated in MDAnalysis 2.0.0"
with pytest.warns(DeprecationWarning, match=wmsg):
Expand Down

0 comments on commit 2457c74

Please sign in to comment.