@skipIf((not platform._supportsSymlinks()), 'No symlink support')
def test_brokenSymlink(self):
    '\n        If on the file in the listing points to a broken symlink, it should not\n        be returned by L{static.DirectoryLister._getFilesAndDirectories}.\n        '
    path = FilePath(self.mktemp())
    path.makedirs()
    file1 = path.child('file1')
    file1.setContent(b'file1')
    file1.linkTo(path.child('file2'))
    file1.remove()
    lister = static.DirectoryLister(path.path)
    directory = os.listdir(path.path)
    directory.sort()
    (dirs, files) = lister._getFilesAndDirectories(directory)
    self.assertEqual(dirs, [])
    self.assertEqual(files, [])
If on the file in the listing points to a broken symlink, it should not
be returned by L{static.DirectoryLister._getFilesAndDirectories}.
@skipIf((not platform._supportsSymlinks()), 'No symlink support')
def test_brokenSymlink(self):
    '\n        If on the file in the listing points to a broken symlink, it should not\n        be returned by L{static.DirectoryLister._getFilesAndDirectories}.\n        '
    path = FilePath(self.mktemp())
    path.makedirs()
    file1 = path.child('file1')
    file1.setContent(b'file1')
    file1.linkTo(path.child('file2'))
    file1.remove()
    lister = static.DirectoryLister(path.path)
    directory = os.listdir(path.path)
    directory.sort()
    (dirs, files) = lister._getFilesAndDirectories(directory)
    self.assertEqual(dirs, [])
    self.assertEqual(files, [])