def testRemoveDatasetsFrom(self): f = h5py.File(self.data_h5, mode='r') try: widget = DataPanel() widget.setData(f["arrays/scalar"]) widget.removeDatasetsFrom(f) self.assertIs(widget.getData(), None) finally: widget.setData(None) f.close()
def testRemoveDatasetsFrom(self): f = h5py.File(os.path.join(_tmpDirectory, "data.h5")) try: widget = DataPanel() widget.setData(f["arrays/scalar"]) widget.removeDatasetsFrom(f) self.assertIs(widget.getData(), None) finally: widget.setData(None) f.close()
def testRemoveDatasetsFrom(self): f = h5py.File(os.path.join(_tmpDirectory, "data.h5")) try: widget = DataPanel() widget.setData(f["arrays/scalar"]) widget.removeDatasetsFrom(f) self.assertIs(widget.getData(), None) finally: widget.setData(None) f.close()