Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_get_planes(self):
x, y, z = ps.tools.get_planes(self.im3D)
assert sp.all(x.shape == (51, 51))
assert sp.all(y.shape == (51, 51))
assert sp.all(z.shape == (51, 51))
with pytest.raises(ValueError):
ps.tools.get_planes(self.im2D)
def test_get_planes(self):
x, y, z = ps.tools.get_planes(self.im3D)
assert sp.all(x.shape == (51, 51))
assert sp.all(y.shape == (51, 51))
assert sp.all(z.shape == (51, 51))
with pytest.raises(ValueError):
ps.tools.get_planes(self.im2D)
def test_get_planes_not_squeezed(self):
x, y, z = ps.tools.get_planes(self.im3D, squeeze=False)
assert sp.all(x.shape == (1, 51, 51))
assert sp.all(y.shape == (51, 1, 51))
assert sp.all(z.shape == (51, 51, 1))
def test_get_planes_not_squeezed(self):
x, y, z = ps.tools.get_planes(self.im3D, squeeze=False)
assert sp.all(x.shape == (1, 51, 51))
assert sp.all(y.shape == (51, 1, 51))
assert sp.all(z.shape == (51, 51, 1))
def test_get_planes(self):
x, y, z = ps.tools.get_planes(self.im3D)
assert sp.all(x.shape == (51, 51))
assert sp.all(y.shape == (51, 51))
assert sp.all(z.shape == (51, 51))
with pytest.raises(ValueError):
ps.tools.get_planes(self.im2D)
def test_get_planes(self):
x, y, z = ps.tools.get_planes(self.im3D)
assert sp.all(x.shape == (51, 51))
assert sp.all(y.shape == (51, 51))
assert sp.all(z.shape == (51, 51))
with pytest.raises(ValueError):
ps.tools.get_planes(self.im2D)