def test_orientations_from_list():
    expected_orientations = [(0, 0, 0), (0, 90, 0)]
    structure_library_generator = StructureLibraryGenerator([('a', None,
                                                              'cubic')])
    structure_library = structure_library_generator.get_orientations_from_list(
        expected_orientations)
    assert structure_library.identifiers == ['a']
    assert structure_library.structures == [None]
    np.testing.assert_almost_equal(structure_library.orientations,
                                   expected_orientations)
def test_orientations_from_stereographic_triangle():
    structure_cubic = create_structure_cubic()
    structure_library_generator = StructureLibraryGenerator([
        ('a', structure_cubic, 'cubic')
    ])
    structure_library = structure_library_generator.get_orientations_from_stereographic_triangle(
        [[0]], np.pi / 8)
    assert structure_library.identifiers == ['a']
    assert structure_library.structures == [structure_cubic]
    # Tests for rotation_list_stereographic checks correctness of list content
    assert len(structure_library.orientations) == 1