def test_with_field(self): root = self._file.root() f = root.create_field("test_scalar","float64") f.attributes.create("units","string").write("nm") self.assertEqual(get_unit(f),"nm")