def test_xml_list(): """Test the xml generation.""" np.random.seed(0) data = np.random.random((15, 30)) layer = Image(data) xml = layer.to_xml_list() assert type(xml) == list assert len(xml) == 1 assert type(xml[0]) == Element
def test_xml_list(): """Test the xml generation.""" shapes = [(40, 20), (20, 10), (10, 5)] np.random.seed(0) data = [np.random.random(s) for s in shapes] layer = Image(data, is_pyramid=True) xml = layer.to_xml_list() assert type(xml) == list assert len(xml) == 1 assert type(xml[0]) == Element