def test_writeExtended(self):
        cb = [False]
        def stubStopWriting():
            cb[0] = True
        # no window to start with
        self.channel.stopWriting = stubStopWriting
        self.channel.writeExtended(1, 'd')
        self.channel.writeExtended(1, 'a')
        self.channel.writeExtended(2, 't')
        self.assertFalse(self.channel.areWriting)
        self.assertTrue(cb[0])
        # regular write
        self.channel.addWindowBytes(20)
        self.channel.writeExtended(2, 'a')
        data = self.conn.extData[self.channel]
        self.assertEqual(data, [(1, 'da'), (2, 't'), (2, 'a')])
        self.assertEqual(self.channel.remoteWindowLeft, 16)
        # larger than max packet
        self.channel.writeExtended(3, '12345678901')
        self.assertEqual(data, [(1, 'da'), (2, 't'), (2, 'a'),
            (3, '1234567890'), (3, '1')])
        self.assertEqual(self.channel.remoteWindowLeft, 5)
        # running out of window
        cb[0] = False
        self.channel.writeExtended(4, '123456')
        self.assertFalse(self.channel.areWriting)
        self.assertTrue(cb[0])
        self.assertEqual(data, [(1, 'da'), (2, 't'), (2, 'a'),
            (3, '1234567890'), (3, '1'), (4, '12345')])
        self.assertEqual(self.channel.extBuf, [[4, '6']])
        self.assertEqual(self.channel.remoteWindowLeft, 0)
Retrieves the root file entry.
dataset/ETHPy150Open twisted/twisted/twisted/conch/test/test_channel.py/ChannelTests.test_writeExtended--crossover with--dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/vfs/tsk_partition_file_system.py/TSKPartitionFileSystem.GetRootFileEntry