Commit cdfa4c99 authored by dboe's avatar dboe
Browse files

minor templating bugfix

parent 2e733190
......@@ -36,13 +36,13 @@ class TensorMaps_Empty_Test(Base_Check, unittest.TestCase):
def _check_maps(self, inst, template, merged_cut):
self.assertEqual(len(inst.maps), len(merged_cut.maps))
self.assertEqual(len(merged_cut.maps), len(template.maps))
for i, mp in enumerate(inst.maps):
for mp_dim, mp in inst.maps.items():
self.assertEqual(len(mp),
len(merged_cut.maps[i]))
len(merged_cut.maps[mp_dim]))
self.assertEqual(tfields.core.dim(mp),
tfields.core.dim(merged_cut.maps[i]))
self.assertEqual(tfields.core.dim(template.maps[i]),
tfields.core.dim(merged_cut.maps[i]))
tfields.core.dim(merged_cut.maps[mp_dim]))
self.assertEqual(tfields.core.dim(template.maps[mp_dim]),
tfields.core.dim(merged_cut.maps[mp_dim]))
self.assertTrue(tfields.TensorFields(inst).equal(
tfields.TensorFields(merged_cut)))
self.assertTrue(inst.equal(merged_cut))
......@@ -87,7 +87,4 @@ class TensorMaps_Test(TensorMaps_Empty_Test):
if __name__ == '__main__':
a = TensorMaps_Empty_Test()
a.setUp()
print("DONE SETUPT")
a.test_merging()
# unittest.main()
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment