l.t.s.f.FakeContent(io.IOBase) : class documentation

Part of lp.testing.swift.fakeswift View In Hierarchy

A content that can be sliced or read but will never exist in memory.
Method __init__ Create the content as char*size.
Method __getitem__ Get a piece of the content.
Method hexdigest Send a fake hexdigest.
Method __len__ The size.
Method read Read a block of data.
def __init__(self, char, size):
Create the content as char*size.
def __getitem__(self, slice):
Get a piece of the content.
def hexdigest(self):
Send a fake hexdigest.

For big contents this takes too much time to calculate, so we just fake it.

def __len__(self):
The size.
def read(self, size):
Read a block of data.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.