Example #1
0
 def test_file_resolve_path(self):
     f = File(filepath='~/Desktop/../Lenna.png')
     self.assertEqual(f.path, path.expanduser('~/Lenna.png'))
     f.path = '~/test'
     self.assertEqual(f.path, path.expanduser('~/test'))
     f.path = '../../testdata/Lenna.png'
     self.assertEqual(f.path, '../../testdata/Lenna.png')
Example #2
0
 def test_wrong_filepath(self):
     f = File()
     f.path = '/non-exist-file'
     f.make_tuple()