Ejemplo n.º 1
0
    def test_trajectorylog(self):
        tlog_file = osp.join(self.anon_folder, 'PatientID_4DC Treatment_JST90_TX_20140712094246.bin')
        tlog = MachineLog(tlog_file)
        tlog.anonymize()

        files = tlog.anonymize(inplace=True, suffix='inplace')
        self.assertIsInstance(files, list)
        for file in files:
            self.assertTrue('inplace' in file)
Ejemplo n.º 2
0
    def test_dynalog(self):
        # test making an anonymized copy
        dlog_file = osp.join(self.anon_folder, 'A1234_patientid.dlg')
        dlog = MachineLog(dlog_file)
        dlog.anonymize()

        # test doing inplace anonymization
        files = dlog.anonymize(inplace=True, suffix='inplace')
        self.assertIsInstance(files, list)
        for file in files:
            self.assertTrue('inplace' in file)
Ejemplo n.º 3
0
    def test_trajectorylog(self):
        tlog_file = osp.join(
            self.anon_folder,
            'PatientID_4DC Treatment_JST90_TX_20140712094246.bin')
        tlog = MachineLog(tlog_file)
        tlog.anonymize()

        files = tlog.anonymize(inplace=True, suffix='inplace')
        self.assertIsInstance(files, list)
        for file in files:
            self.assertTrue('inplace' in file)
Ejemplo n.º 4
0
    def test_dynalog(self):
        # test making an anonymized copy
        dlog_file = osp.join(self.anon_folder, 'A1234_patientid.dlg')
        dlog = MachineLog(dlog_file)
        dlog.anonymize()

        # test doing inplace anonymization
        files = dlog.anonymize(inplace=True, suffix='inplace')
        self.assertIsInstance(files, list)
        for file in files:
            self.assertTrue('inplace' in file)
Ejemplo n.º 5
0
 def test_bad_name(self):
     """Test that a log with a bad name (no underscore) fails gracefully."""
     dlog_file = osp.join(self.anon_folder, 'A1234patientid.dlg')
     dlog = MachineLog(dlog_file)
     with self.assertRaises(NameError):
         dlog.anonymize()
Ejemplo n.º 6
0
 def test_destination(self):
     tlog_file = osp.join(self.anon_folder, 'PatientID_4DC Treatment_JST90_TX_20140712094246.bin')
     tlog = MachineLog(tlog_file)
     tlog.anonymize(destination=self.anon_folder)  # shouldn't raise
Ejemplo n.º 7
0
 def test_bad_name(self):
     """Test that a log with a bad name (no underscore) fails gracefully."""
     dlog_file = osp.join(self.anon_folder, 'A1234patientid.dlg')
     dlog = MachineLog(dlog_file)
     with self.assertRaises(NameError):
         dlog.anonymize()
Ejemplo n.º 8
0
 def test_destination(self):
     tlog_file = osp.join(
         self.anon_folder,
         'PatientID_4DC Treatment_JST90_TX_20140712094246.bin')
     tlog = MachineLog(tlog_file)
     tlog.anonymize(destination=self.anon_folder)  # shouldn't raise