b.t.f.FakeReadFile(object) : class documentation

Part of bzrlib.tests.file_utils View In Hierarchy

A file-like object that can be given predefined content and read like a file. The maximum size and number of the reads is recorded.
Method __init__ Initialize the mock file object with the provided data.
Method read Reads size characters from the input (or the rest of the string if
Method get_max_read_size Returns the maximum read size or None if no reads have occured.
Method get_read_count Returns the number of calls to read.
Method reset_read_count Clears the read count.
def __init__(self, data):
Initialize the mock file object with the provided data.
def read(self, size=-1):
Reads size characters from the input (or the rest of the string if size is -1).
def get_max_read_size(self):
Returns the maximum read size or None if no reads have occured.
def get_read_count(self):
Returns the number of calls to read.
def reset_read_count(self):
Clears the read count.
API Documentation for Bazaar, generated by pydoctor at 2019-11-13 00:26:04.