~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_subsume.py

  • Committer: Vincent Ladeuil
  • Date: 2016-01-21 17:48:07 UTC
  • mto: This revision was merged to the branch mainline in revision 6613.
  • Revision ID: v.ladeuil+lp@free.fr-20160121174807-g4ybpaij9ln5wj6a
Make all transport put_bytes() raises TypeError when given unicode strings rather than bytes.

There was a mix of AssertionError or UnicodeEncodeError.

Also deleted test_put_file_unicode() which was bogus, files contain bytes not unicode strings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
    def make_branch_and_tree(self, relpath, format=None):
23
23
        if format is None:
24
 
            format = 'dirstate-with-subtree'
 
24
            format = 'development-subtree'
25
25
        return tests.TestCaseWithTransport.make_branch_and_tree(self, relpath,
26
26
                                                                format)
27
27
 
34
34
        base_tree.add('file', 'file-id')
35
35
        base_tree.commit('first commit', rev_id='tree-1')
36
36
        sub_tree = self.make_branch_and_tree('tree/subtree',
37
 
            format='dirstate-with-subtree')
 
37
            format='development-subtree')
38
38
        if same_root is True:
39
39
            sub_tree.set_root_id(base_tree.get_root_id())
40
40
        sub_tree.add('file2', 'file2-id')