Пример #1
0
 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')
Пример #2
0
 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, '')