/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/file_utils.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from cStringIO import StringIO
 
17
from ..sixish import (
 
18
    BytesIO,
 
19
    )
 
20
 
18
21
 
19
22
class FakeReadFile(object):
20
23
    """A file-like object that can be given predefined content and read
22
25
 
23
26
    def __init__(self, data):
24
27
        """Initialize the mock file object with the provided data."""
25
 
        self.data = StringIO(data)
 
28
        self.data = BytesIO(data)
26
29
        self.max_read_size = None
27
30
        self.read_count = 0
28
31