better test coverage

This commit is contained in:
Martin Diehl 2022-04-27 17:25:39 +02:00
parent 8faa5296a1
commit e0d2859202
2 changed files with 6 additions and 4 deletions

View File

@ -551,7 +551,7 @@ class Rotation:
Parameters
----------
degrees : bool, optional
Return angles in degrees.
Return angles in degrees. Defaults to False.
Returns
-------

View File

@ -150,10 +150,12 @@ class TestOrientation:
== np.eye(3))
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)
assert np.all(Orientation.from_fiber_component(crystal=np.zeros(2),sample=np.zeros(2),
sigma=0.0,shape=None,rng_seed=0,family='triclinic').quaternion
assert np.all(Orientation.from_fiber_component(crystal=crystal,sample=sample,
sigma=0.0,shape=None,rng_seed=0,lattice='cI').quaternion
== r.quaternion)
@pytest.mark.parametrize('kwargs',[