def assertCubeListEqual(self, cubelist_a: CubeList, cubelist_b: CubeList): """Uses CubeList.xml method to create an easily-comparable string containing all meta-data and data""" self.assertEqual( cubelist_a.xml(checksum=True, order=False, byteorder=False), cubelist_b.xml(checksum=True, order=False, byteorder=False), )
class Test_xml(tests.IrisTest): def setUp(self): self.cubes = CubeList([Cube(np.arange(3)), Cube(np.arange(3))]) def test_byteorder_default(self): self.assertIn('byteorder', self.cubes.xml()) def test_byteorder_false(self): self.assertNotIn('byteorder', self.cubes.xml(byteorder=False)) def test_byteorder_true(self): self.assertIn('byteorder', self.cubes.xml(byteorder=True))