|
33 | 33 | from MDAnalysis import SelectionError, SelectionWarning |
34 | 34 | from MDAnalysis.core.selection import Parser |
35 | 35 | from MDAnalysis.lib.distances import distance_array |
36 | | -from MDAnalysis.lib.pkdtree import PeriodicKDTree |
37 | 36 | from MDAnalysis.tests.datafiles import ( |
38 | 37 | DCD, |
39 | 38 | GRO, |
|
57 | 56 | waterPSF, |
58 | 57 | ) |
59 | 58 | from numpy.lib import NumpyVersion |
60 | | -from numpy.testing import assert_array_equal, assert_equal |
| 59 | +from numpy.testing import assert_equal |
61 | 60 |
|
62 | 61 | from MDAnalysisTests import make_Universe |
63 | 62 |
|
@@ -1737,19 +1736,11 @@ def test_formal_charge_selection(sel, size, name): |
1737 | 1736 | assert len(ag) == size |
1738 | 1737 | assert ag.atoms[0].name == name |
1739 | 1738 |
|
1740 | | - |
1741 | | -@pytest.fixture(scope="module") |
1742 | | -def universe(): |
| 1739 | +def test_cylayer_selection_parses_correctly(): |
1743 | 1740 | u = mda.Universe(PSF, DCD) |
1744 | 1741 | u.dimensions = np.array([100.0, 100.0, 100.0, 90.0, 90.0, 90.0]) |
1745 | | - return u |
1746 | | - |
1747 | | - |
1748 | | -def test_cylayer_selection_parses_correctly(universe): |
1749 | | - universe.dimensions = np.array([100, 100, 100, 90, 90, 90]) |
1750 | 1742 |
|
1751 | | - sel = universe.select_atoms("cylayer 5 10 15 -15 name CA") |
| 1743 | + sel = u.select_atoms("cylayer 5 10 15 -15 name CA") |
1752 | 1744 |
|
1753 | | - # Basic sanity checks |
1754 | 1745 | assert len(sel) > 0 |
1755 | | - assert sel.n_atoms <= universe.atoms.n_atoms |
| 1746 | + assert sel.n_atoms <= u.atoms.n_atoms |
0 commit comments