better test coverage
This commit is contained in:
parent
8faa5296a1
commit
e0d2859202
|
@ -551,7 +551,7 @@ class Rotation:
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
degrees : bool, optional
|
degrees : bool, optional
|
||||||
Return angles in degrees.
|
Return angles in degrees. Defaults to False.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -150,10 +150,12 @@ class TestOrientation:
|
||||||
== np.eye(3))
|
== np.eye(3))
|
||||||
|
|
||||||
def test_from_fiber_component(self):
|
def test_from_fiber_component(self):
|
||||||
r = Rotation.from_fiber_component(crystal=np.zeros(2),sample=np.zeros(2),
|
crystal = np.random.rand(2) * [180,360]
|
||||||
|
sample = np.random.rand(2) * [180,360]
|
||||||
|
r = Rotation.from_fiber_component(crystal=crystal,sample=sample,
|
||||||
sigma=0.0,shape=1,rng_seed=0)
|
sigma=0.0,shape=1,rng_seed=0)
|
||||||
assert np.all(Orientation.from_fiber_component(crystal=np.zeros(2),sample=np.zeros(2),
|
assert np.all(Orientation.from_fiber_component(crystal=crystal,sample=sample,
|
||||||
sigma=0.0,shape=None,rng_seed=0,family='triclinic').quaternion
|
sigma=0.0,shape=None,rng_seed=0,lattice='cI').quaternion
|
||||||
== r.quaternion)
|
== r.quaternion)
|
||||||
|
|
||||||
@pytest.mark.parametrize('kwargs',[
|
@pytest.mark.parametrize('kwargs',[
|
||||||
|
|
Loading…
Reference in New Issue