def test_listWithStat(self):
        """
        Check the output of list with asked stats.
        """
        self.createDirectory('ned')
        self.createFile('file.txt')
        d = self.shell.list(('.',), ('size', 'permissions',))
        def cb(l):
            l.sort()
            self.assertEqual(len(l), 2)
            self.assertEqual(l[0][0], 'file.txt')
            self.assertEqual(l[1][0], 'ned')
            # Size and permissions are reported differently between platforms
            # so just check they are present
            self.assertEqual(len(l[0][1]), 2)
            self.assertEqual(len(l[1][1]), 2)
        return d.addCallback(cb)

        Check the output of list with asked stats.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py