~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_versioning.py

  • Committer: Vincent Ladeuil
  • Date: 2017-01-30 14:30:10 UTC
  • mfrom: (6615.3.7 merges)
  • mto: This revision was merged to the branch mainline in revision 6621.
  • Revision ID: v.ladeuil+lp@free.fr-20170130143010-p31t1ranfeqbaeki
Merge  2.7 into trunk including fix for bug #1657238

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2009-2012 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2009-2012, 2016 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
46
46
 
47
47
        self.make_branch_and_tree('.')
48
48
        self.run_bzr(['mkdir', 'foo'])
49
 
        self.assert_(os.path.isdir('foo'))
 
49
        self.assertTrue(os.path.isdir('foo'))
50
50
 
51
51
        self.run_bzr(['mkdir', 'foo'], retcode=3)
52
52
 
56
56
 
57
57
        self.log('delta.added = %r' % delta.added)
58
58
 
59
 
        self.assertEquals(len(delta.added), 1)
60
 
        self.assertEquals(delta.added[0][0], 'foo')
 
59
        self.assertEqual(len(delta.added), 1)
 
60
        self.assertEqual(delta.added[0][0], 'foo')
61
61
        self.assertFalse(delta.modified)
62
62
 
63
63
    def test_mkdir_in_subdir(self):
65
65
 
66
66
        self.make_branch_and_tree('.')
67
67
        self.run_bzr(['mkdir', 'dir'])
68
 
        self.assert_(os.path.isdir('dir'))
 
68
        self.assertTrue(os.path.isdir('dir'))
69
69
 
70
70
        self.log('Run mkdir in subdir')
71
71
        self.run_bzr(['mkdir', 'subdir'], working_dir='dir')
72
 
        self.assert_(os.path.isdir('dir/subdir'))
 
72
        self.assertTrue(os.path.isdir('dir/subdir'))
73
73
 
74
74
        wt = WorkingTree.open('.')
75
75
 
77
77
 
78
78
        self.log('delta.added = %r' % delta.added)
79
79
 
80
 
        self.assertEquals(len(delta.added), 2)
81
 
        self.assertEquals(delta.added[0][0], 'dir')
82
 
        self.assertEquals(delta.added[1][0], pathjoin('dir','subdir'))
 
80
        self.assertEqual(len(delta.added), 2)
 
81
        self.assertEqual(delta.added[0][0], 'dir')
 
82
        self.assertEqual(delta.added[1][0], pathjoin('dir','subdir'))
83
83
        self.assertFalse(delta.modified)
84
84
 
85
85
    def test_mkdir_w_nested_trees(self):
99
99
        wt_b = WorkingTree.open('a/b')
100
100
 
101
101
        delta = wt.changes_from(wt.basis_tree())
102
 
        self.assertEquals(len(delta.added), 1)
103
 
        self.assertEquals(delta.added[0][0], 'dir')
 
102
        self.assertEqual(len(delta.added), 1)
 
103
        self.assertEqual(delta.added[0][0], 'dir')
104
104
        self.assertFalse(delta.modified)
105
105
 
106
106
        delta = wt_a.changes_from(wt_a.basis_tree())
107
 
        self.assertEquals(len(delta.added), 1)
108
 
        self.assertEquals(delta.added[0][0], 'dir')
 
107
        self.assertEqual(len(delta.added), 1)
 
108
        self.assertEqual(delta.added[0][0], 'dir')
109
109
        self.assertFalse(delta.modified)
110
110
 
111
111
        delta = wt_b.changes_from(wt_b.basis_tree())
112
 
        self.assertEquals(len(delta.added), 1)
113
 
        self.assertEquals(delta.added[0][0], 'dir')
 
112
        self.assertEqual(len(delta.added), 1)
 
113
        self.assertEqual(delta.added[0][0], 'dir')
114
114
        self.assertFalse(delta.modified)
115
115
 
116
116
    def test_mkdir_quiet(self):
118
118
 
119
119
        self.make_branch_and_tree('.')
120
120
        out, err = self.run_bzr(['mkdir', '--quiet', 'foo'])
121
 
        self.assertEquals('', err)
122
 
        self.assertEquals('', out)
 
121
        self.assertEqual('', err)
 
122
        self.assertEqual('', out)
123
123
 
124
124
 
125
125
class SubdirCommit(TestCaseWithTransport):