/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/file_utils.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

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