Exemple #1
0
 def test_write_sparse_dataset(self, tmp_path):
     writers.write_dataset(tmp_path,
                           self.ds,
                           outcome_label_order=None,
                           fixed_column_mode=True)
     self.assertFilesEquivalent(tmp_path,
                                self.reference_path('sparse_dataset1a.txt'))
     writers.write_dataset(tmp_path,
                           self.ds,
                           outcome_label_order=None,
                           fixed_column_mode=False)
     self.assertFilesEquivalent(tmp_path,
                                self.reference_path('sparse_dataset2a.txt'))
Exemple #2
0
 def test_write_sparse_dataset_ordered(self, tmp_path):
     ordering = io_gen.ordering
     writers.write_dataset(tmp_path,
                           self.ds,
                           outcome_label_order=ordering,
                           fixed_column_mode=True)
     self.assertFilesEquivalent(tmp_path,
                                self.reference_path('sparse_dataset1b.txt'))
     writers.write_dataset(tmp_path,
                           self.ds,
                           outcome_label_order=ordering,
                           fixed_column_mode=False)
     self.assertFilesEquivalent(tmp_path,
                                self.reference_path('sparse_dataset2b.txt'))
Exemple #3
0
 def test_write_dataset_raises_on_bad_type(self, tmp_path):
     with self.assertRaises(ValueError):
         writers.write_dataset(tmp_path, self.ds, [('Gx', )])
Exemple #4
0
 def test_write_dataset(self, tmp_path):
     writers.write_dataset(tmp_path, self.ds)
     self.assertFilesEquivalent(
         tmp_path, self.reference_path('dataset_loadwrite.txt'))