~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2011 Canonical Ltd
 
1
# Copyright (C) 2011, 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
27
27
    def test_mkdir(self):
28
28
        tree = self.make_branch_and_tree('.')
29
29
        self.run_bzr(['mkdir', 'somedir'])
30
 
        self.assertEquals(tree.kind(tree.path2id('somedir')), "directory")
 
30
        self.assertEqual(tree.kind(tree.path2id('somedir')), "directory")
31
31
 
32
32
    def test_mkdir_multi(self):
33
33
        tree = self.make_branch_and_tree('.')
34
34
        self.run_bzr(['mkdir', 'somedir', 'anotherdir'])
35
 
        self.assertEquals(tree.kind(tree.path2id('somedir')), "directory")
36
 
        self.assertEquals(tree.kind(tree.path2id('anotherdir')), "directory")
 
35
        self.assertEqual(tree.kind(tree.path2id('somedir')), "directory")
 
36
        self.assertEqual(tree.kind(tree.path2id('anotherdir')), "directory")
37
37
 
38
38
    def test_mkdir_parents(self):
39
39
        tree = self.make_branch_and_tree('.')
40
40
        self.run_bzr(['mkdir', '-p', 'somedir/foo'])
41
 
        self.assertEquals(tree.kind(tree.path2id('somedir/foo')), "directory")
 
41
        self.assertEqual(tree.kind(tree.path2id('somedir/foo')), "directory")
42
42
 
43
43
    def test_mkdir_parents_existing_versioned_dir(self):
44
44
        tree = self.make_branch_and_tree('.')
45
45
        tree.mkdir('somedir')
46
 
        self.assertEquals(tree.kind(tree.path2id('somedir')), "directory")
 
46
        self.assertEqual(tree.kind(tree.path2id('somedir')), "directory")
47
47
        self.run_bzr(['mkdir', '-p', 'somedir'])
48
48
 
49
49
    def test_mkdir_parents_existing_unversioned_dir(self):
50
50
        tree = self.make_branch_and_tree('.')
51
51
        os.mkdir('somedir')
52
52
        self.run_bzr(['mkdir', '-p', 'somedir'])
53
 
        self.assertEquals(tree.kind(tree.path2id('somedir')), "directory")
 
53
        self.assertEqual(tree.kind(tree.path2id('somedir')), "directory")
54
54
 
55
55
    def test_mkdir_parents_with_unversioned_parent(self):
56
56
        tree = self.make_branch_and_tree('.')
57
57
        os.mkdir('somedir')
58
58
        self.run_bzr(['mkdir', '-p', 'somedir/foo'])
59
 
        self.assertEquals(tree.kind(tree.path2id('somedir/foo')), "directory")
 
59
        self.assertEqual(tree.kind(tree.path2id('somedir/foo')), "directory")