예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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()
예제 #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
예제 #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()
예제 #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