/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/test_bad_files.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-03-25 11:54:30 UTC
  • mfrom: (6855.4.10 more-bees)
  • Revision ID: breezy.the.bot@gmail.com-20180325115430-75xnlbrmzjoomd83
Add more bees. In particular:

* for file ids
* for revision ids
* for file contents in build_tree_contents()

Merged from https://code.launchpad.net/~jelmer/brz/more-bees/+merge/337919

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2007 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2009, 2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
 
18
18
"""Tests being able to ignore bad filetypes."""
19
19
 
20
 
from cStringIO import StringIO
21
20
import os
22
21
 
23
 
from bzrlib import (
24
 
    add,
 
22
from .. import (
25
23
    errors,
26
24
    )
27
 
from bzrlib.status import show_tree_status
28
 
from bzrlib.tests import OsFifoFeature, TestCaseWithTransport
 
25
from ..sixish import (
 
26
    BytesIO,
 
27
    )
 
28
from ..status import show_tree_status
 
29
from . import TestCaseWithTransport
 
30
from .features import (
 
31
    OsFifoFeature,
 
32
    )
29
33
 
30
34
 
31
35
def verify_status(tester, tree, value):
32
36
    """Verify the output of show_tree_status"""
33
 
    tof = StringIO()
 
37
    tof = BytesIO()
34
38
    show_tree_status(tree, to_file=tof)
35
39
    tof.seek(0)
36
40
    tester.assertEqual(value, tof.readlines())