/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/per_repository/test_revision.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-06-30 23:11:39 UTC
  • mfrom: (6973.12.13 python3-k)
  • Revision ID: breezy.the.bot@gmail.com-20180630231139-tf5t5khh6bu5ntpm
Fix some more tests on python3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-k/+merge/348646

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
        b = wt.branch
30
30
        b.nick = 'Nicholas'
31
31
        if b.repository._format.supports_custom_revision_properties:
32
 
            props = dict(flavor='choc-mint',
33
 
                         condiment='orange\n  mint\n\tcandy',
34
 
                         empty='',
35
 
                         non_ascii=u'\xb5')
 
32
            props = {u'flavor': 'choc-mint',
 
33
                     u'condiment': 'orange\n  mint\n\tcandy',
 
34
                     u'empty': '',
 
35
                     u'non_ascii': u'\xb5'}
36
36
        else:
37
37
            props = {}
38
38
        rev1 = wt.commit(message='initial null commit',
40
40
                 allow_pointless=True)
41
41
        rev = b.repository.get_revision(rev1)
42
42
        if b.repository._format.supports_custom_revision_properties:
43
 
            self.assertTrue('flavor' in rev.properties)
44
 
            self.assertEqual(rev.properties['flavor'], 'choc-mint')
 
43
            self.assertTrue(u'flavor' in rev.properties)
 
44
            self.assertEqual(rev.properties[u'flavor'], 'choc-mint')
45
45
            expected_revprops = {
46
 
                'condiment': 'orange\n  mint\n\tcandy',
47
 
                'empty': '',
48
 
                'flavor': 'choc-mint',
49
 
                'non_ascii': u'\xb5',
 
46
                u'condiment': 'orange\n  mint\n\tcandy',
 
47
                u'empty': '',
 
48
                u'flavor': 'choc-mint',
 
49
                u'non_ascii': u'\xb5',
50
50
                }
51
51
        else:
52
52
            expected_revprops = {}
53
53
        if b.repository._format.supports_storing_branch_nick:
54
 
            expected_revprops['branch-nick'] = 'Nicholas'
 
54
            expected_revprops[u'branch-nick'] = 'Nicholas'
55
55
        for name, value in expected_revprops.items():
56
56
            self.assertEqual(rev.properties[name], value)
57
57
 
81
81
        """
82
82
        tree1 = self.make_branch_and_tree("br1")
83
83
        if tree1.branch.repository._format.supports_custom_revision_properties:
84
 
            revprops={'empty':'',
85
 
                      'value':'one',
86
 
                      'unicode':u'\xb5',
87
 
                      'multiline':'foo\nbar\n\n'
 
84
            revprops={u'empty':'',
 
85
                      u'value':'one',
 
86
                      u'unicode':u'\xb5',
 
87
                      u'multiline':'foo\nbar\n\n'
88
88
                      }
89
89
        else:
90
90
            revprops = {}