Exemplo n.º 1
0
 def setUp(self):
     self.importer = io.AsdfImporter()
     self.dataset = dataset.ExperimentalDataset()
     self.source = 'target'
     self.extension = '.asdf'
     self.exporter = io.AsdfExporter()
     self.exporter.target = self.source
Exemplo n.º 2
0
 def test_import_sets_metadata(self):
     dataset_ = dataset.ExperimentalDataset()
     dataset_.metadata.sample.name = 'foo'
     dataset_.export_to(self.exporter)
     self.importer.source = self.source
     self.dataset.import_from(self.importer)
     self.assertEqual(dataset_.metadata.sample.name,
                      self.dataset.metadata.sample.name)
Exemplo n.º 3
0
 def test_import_sets_history(self):
     dataset_ = dataset.ExperimentalDataset()
     processing_step = aspecd.processing.SingleProcessingStep()
     processing_step.comment = 'foo'
     dataset_.process(processing_step)
     dataset_.export_to(self.exporter)
     self.importer.source = self.source
     self.dataset.import_from(self.importer)
     self.assertDictEqual(dataset_.history[0].to_dict(),
                          self.dataset.history[0].to_dict())
Exemplo n.º 4
0
 def setUp(self):
     self.exporter = io.TxtExporter()
     self.dataset = dataset.ExperimentalDataset()
     self.target = 'target.txt'
Exemplo n.º 5
0
 def setUp(self):
     self.importer = io.TxtImporter()
     self.dataset = dataset.ExperimentalDataset()
     self.source = 'target.txt'
Exemplo n.º 6
0
 def setUp(self):
     self.dataset = dataset.ExperimentalDataset()