def test_load_visualization(self): saved_visualization = Visualization._from_data_dir( self.data_dir, self.make_provenance_capture()) fp = os.path.join(self.test_dir.name, 'visualization.qzv') saved_visualization.save(fp) visualization = Result.load(fp) self.assertIsInstance(visualization, Visualization) self.assertEqual(visualization.type, qiime2.core.type.Visualization) self.assertEqual(visualization.uuid, saved_visualization.uuid)
def test_load_artifact(self): saved_artifact = Artifact.import_data(FourInts, [-1, 42, 0, 43]) fp = os.path.join(self.test_dir.name, 'artifact.qza') saved_artifact.save(fp) artifact = Result.load(fp) self.assertIsInstance(artifact, Artifact) self.assertEqual(artifact.type, FourInts) self.assertEqual(artifact.uuid, saved_artifact.uuid) self.assertEqual(artifact.view(list), [-1, 42, 0, 43])