def test_emptyFilePaging(self):
        """
        Test L{util.FilePager}, sending an empty file.
        """
        filenameEmpty = self.mktemp()
        open(filenameEmpty, 'w').close()
        c, s, pump = connectedServerAndClient(test=self)
        pagerizer = FilePagerizer(filenameEmpty, None)
        s.setNameForLocal("bar", pagerizer)
        x = c.remoteForName("bar")
        l = []
        util.getAllPages(x, "getPages").addCallback(l.append)
        ttl = 10
        while not l and ttl > 0:
            pump.pump()
            ttl -= 1
        if not ttl:
            self.fail('getAllPages timed out')
        self.assertEqual(b''.join(l[0]), b'',
                          "Pages received not equal to pages sent!")

        Test L{util.FilePager}, sending an empty file.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/test/test_pb.py