def test_statFile(self):
        """
        Check the output of the stat method on a file.
        """
        fileContent = b'wobble\n'
        self.createFile('file.txt', fileContent)
        d = self.shell.stat(('file.txt',), ('size', 'directory'))
        def cb(res):
            self.assertEqual(res[0], len(fileContent))
            self.assertFalse(res[1])
        d.addCallback(cb)
        return d

        Check the output of the stat method on a file.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py