Exemplo n.º 1
0
 def test_coercion(self):
     fss = macfs.FSSpec(test_support.TESTFN)
     fsr = macfs.FSRef(test_support.TESTFN)
     fss2 = fsr.as_fsspec()
     fsr2 = fss.as_fsref()
     self.assertEqual(fss.as_pathname(), fss2.as_pathname())
     self.assertEqual(fsr.as_pathname(), fsr2.as_pathname())
Exemplo n.º 2
0
 def test_fsref_unicode(self):
     if sys.getfilesystemencoding():
         testfn_unicode = unicode(test_support.TESTFN)
         fsr = macfs.FSRef(testfn_unicode)
         self.assertEqual(os.path.realpath(test_support.TESTFN), fsr.as_pathname())
Exemplo n.º 3
0
 def test_fsref(self):
     fsr = macfs.FSRef(test_support.TESTFN)
     self.assertEqual(os.path.realpath(test_support.TESTFN), fsr.as_pathname())