コード例 #1
0
    def _assert_read_link(self, target):
        """Assert if the target path of the link is correct."""
        destination = os.path.join(self.basedir, target)
        darwin.make_link(self.testfile, destination)

        target = darwin.read_link(destination)
        self.assertEqual(self.testfile.encode('utf-8'), target)
コード例 #2
0
    def test_make_link(self):
        """The link is properly made."""
        destination = os.path.join(self.basedir, 'destination')
        darwin.make_link(self.testfile, destination)

        self.assertTrue(darwin.is_link(destination))
        self.assertEqual(self.testfile.encode('utf-8'),
                         darwin.read_link(destination))