def test_ManyLargeDownloads(self):
        """
        Download many large files.

        @return: L{Deferred}
        """
        # Login
        d = self._anonymousLogin()

        # Download a range of different size files
        for size in range(100000, 110000, 500):
            with open(os.path.join(self.directory,
                      '%d.txt' % (size,)), 'wb') as fObj:
                fObj.write(b'x' * size)

            self._download('RETR %d.txt' % (size,), chainDeferred=d)
            def checkDownload(download, size=size):
                self.assertEqual(size, len(download))
            d.addCallback(checkDownload)
        return d

        Download many large files.

        @return: L{Deferred}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py