Skip to content

Commit eacc7d9

Browse files
committed
updated test_pop_axis_and_swap()
1 parent 3e32d3d commit eacc7d9

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/test_components/test_geometry.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -767,27 +767,25 @@ def test_geometry_touching_intersections_plane(x0):
767767

768768

769769
def test_pop_axis():
770-
b = td.Box(size=(1, 1, 1))
771770
for axis in range(3):
772771
coords = (1, 2, 3)
773-
Lz, (Lx, Ly) = b.pop_axis(coords, axis=axis)
774-
_coords = b.unpop_axis(Lz, (Lx, Ly), axis=axis)
772+
Lz, (Lx, Ly) = td.Box.pop_axis(coords, axis=axis)
773+
_coords = td.Box.unpop_axis(Lz, (Lx, Ly), axis=axis)
775774
assert all(c == _c for (c, _c) in zip(coords, _coords))
776-
_Lz, (_Lx, _Ly) = b.pop_axis(_coords, axis=axis)
775+
_Lz, (_Lx, _Ly) = td.Box.pop_axis(_coords, axis=axis)
777776
assert Lz == _Lz
778777
assert Lx == _Lx
779778
assert Ly == _Ly
780779

781780

782781
@pytest.mark.parametrize("transpose", [True, False])
783782
def test_pop_axis_and_swap(transpose):
784-
b = td.Box(size=(1, 1, 1))
785783
for axis in range(3):
786784
coords = (1, 2, 3)
787-
Lz, (Lx, Ly) = b.pop_axis_and_swap(coords, axis=axis, transpose=transpose)
788-
_coords = b.unpop_axis_and_swap(Lz, (Lx, Ly), axis=axis, transpose=transpose)
785+
Lz, (Lx, Ly) = td.Box.pop_axis_and_swap(coords, axis=axis, transpose=transpose)
786+
_coords = td.Box.unpop_axis_and_swap(Lz, (Lx, Ly), axis=axis, transpose=transpose)
789787
assert all(c == _c for (c, _c) in zip(coords, _coords))
790-
_Lz, (_Lx, _Ly) = b.pop_axis_and_swap(_coords, axis=axis, transpose=transpose)
788+
_Lz, (_Lx, _Ly) = td.Box.pop_axis_and_swap(_coords, axis=axis, transpose=transpose)
791789
assert Lz == _Lz
792790
assert Lx == _Lx
793791
assert Ly == _Ly

0 commit comments

Comments
 (0)