コード例 #1
0
ファイル: TestUtilities.py プロジェクト: kosio/EpiExplorer
    def test_rm_files_absent_file(self):
        # Raises exception
        # This raises actual Exception and fails if lamda is not used???
        # http://stackoverflow.com/questions/6103825/how-to-properly-use-unit-testings-assertraises-with-nonetype-objects
        self.assertRaises(Exception, lambda: utilities.rm_files(["absentfile"], True))

        # No exception
        # This was causing failures as call to log defaults to a file which did not exist
        self.assertTrue(utilities.rm_files(["absentfile"], False) == 0)
コード例 #2
0
    def test_rm_files_absent_file(self):
        # Raises exception
        # This raises actual Exception and fails if lamda is not used???
        # http://stackoverflow.com/questions/6103825/how-to-properly-use-unit-testings-assertraises-with-nonetype-objects
        self.assertRaises(Exception,
                          lambda: utilities.rm_files(["absentfile"], True))

        # No exception
        # This was causing failures as call to log defaults to a file which did not exist
        self.assertTrue(utilities.rm_files(["absentfile"], False) == 0)
コード例 #3
0
 def tearDown(self):
     utilities.rm_files([self.logfile], True)
コード例 #4
0
ファイル: TestUtilities.py プロジェクト: kosio/EpiExplorer
 def tearDown(self):
     utilities.rm_files([self.logfile], True)