79
79
tree.move(['a1'], 'sub1', after=False))
82
def test_move_deprecated_wrong_call(self):
83
"""tree.move has the deprecated parameter 'to_name'.
84
It has been replaced by 'to_dir' for consistency.
85
Test the new API using wrong parameter
87
self.build_tree(['a1', 'sub1/'])
88
tree = self.make_branch_and_tree('.')
89
tree.add(['a1', 'sub1'])
90
tree.commit('initial commit')
91
self.assertRaises(TypeError, tree.move, ['a1'],
92
to_this_parameter_does_not_exist='sub1',
96
def test_move_deprecated_call(self):
97
"""tree.move has the deprecated parameter 'to_name'.
98
It has been replaced by 'to_dir' for consistency.
99
Test the new API using deprecated parameter
101
self.build_tree(['a1', 'sub1/'])
102
tree = self.make_branch_and_tree('.')
103
tree.add(['a1', 'sub1'])
104
tree.commit('initial commit')
107
self.callDeprecated(['The parameter to_name was deprecated'
108
' in version 0.13. Use to_dir instead'],
109
tree.move, ['a1'], to_name='sub1',
112
# WorkingTreeFormat4 and later don't have to maintain api
113
# compatibility since it was deprecated before they were introduced.
114
if not isinstance(self.workingtree_format,
115
DirStateWorkingTreeFormat):
119
82
def test_move_target_not_dir(self):
120
83
tree = self.make_branch_and_tree('.')
121
84
self.build_tree(['a'])