def testValidFilePath(self): ''' Test that the last element is returned if a valid path is given ''' valid_path = 'valid/path/to/filename.py' returned_name = fut.extract_filename(valid_path) self.assertEqual(returned_name, 'filename.py')
def testEmptyFilePath(self): ''' Test that an empty filename is returned although an empty filepath is given ''' returned_name = fut.extract_filename('') self.assertEqual(returned_name, '')