/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: Martin
  • Date: 2018-11-16 16:38:22 UTC
  • mto: This revision was merged to the branch mainline in revision 7172.
  • Revision ID: gzlist@googlemail.com-20181116163822-yg1h1cdng6w7w9kn
Make --profile-imports work on Python 3

Also tweak heading to line up correctly.

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
    StringIO,
 
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):
46
50
        b = wt.branch
47
51
 
48
52
        files = ['one', 'two', 'three']
49
 
        file_ids = ['one-id', 'two-id', 'three-id']
 
53
        file_ids = [b'one-id', b'two-id', b'three-id']
50
54
        self.build_tree(files)
51
55
        wt.add(files, file_ids)
52
 
        wt.commit("Commit one", rev_id="a@u-0-0")
 
56
        wt.commit("Commit one", rev_id=b"a@u-0-0")
53
57
 
54
58
        # We should now have a few files, lets try to
55
59
        # put some bogus stuff in the tree
85
89
                           'unknown:\n',
86
90
                           '  a-fifo\n',
87
91
                           ])
88
 
        wt.commit("Commit four", rev_id="a@u-0-3")
 
92
        wt.commit("Commit four", rev_id=b"a@u-0-3")
89
93
 
90
94
        verify_status(self, wt,
91
95
                          ['unknown:\n',