682
682
tree.add, [u'a\u030a'])
684
684
osutils.normalized_filename = orig
686
def test_move_deprecated_correct_call_named(self):
687
"""tree.move has the deprecated parameter 'to_name'.
688
It has been replaced by 'to_dir' for consistency.
689
Test the new API using named parameter"""
690
self.build_tree(['a1', 'sub1/'])
691
tree = self.make_branch_and_tree('.')
692
tree.add(['a1', 'sub1'])
693
tree.commit('initial commit')
694
tree.move(['a1'], to_dir='sub1', after=False)
696
def test_move_deprecated_correct_call_unnamed(self):
697
"""tree.move has the deprecated parameter 'to_name'.
698
It has been replaced by 'to_dir' for consistency.
699
Test the new API using unnamed parameter"""
700
self.build_tree(['a1', 'sub1/'])
701
tree = self.make_branch_and_tree('.')
702
tree.add(['a1', 'sub1'])
703
tree.commit('initial commit')
704
tree.move(['a1'], 'sub1', after=False)
706
def test_move_deprecated_wrong_call(self):
707
"""tree.move has the deprecated parameter 'to_name'.
708
It has been replaced by 'to_dir' for consistency.
709
Test the new API using wrong parameter"""
710
self.build_tree(['a1', 'sub1/'])
711
tree = self.make_branch_and_tree('.')
712
tree.add(['a1', 'sub1'])
713
tree.commit('initial commit')
714
self.assertRaises(TypeError, tree.move, ['a1'],
715
to_this_parameter_does_not_exist='sub1',
718
def test_move_deprecated_deprecated_call(self):
719
"""tree.move has the deprecated parameter 'to_name'.
720
It has been replaced by 'to_dir' for consistency.
721
Test the new API using deprecated parameter"""
722
self.build_tree(['a1', 'sub1/'])
723
tree = self.make_branch_and_tree('.')
724
tree.add(['a1', 'sub1'])
725
tree.commit('initial commit')
727
#tree.move(['a1'], to_name='sub1', after=False)
728
self.callDeprecated(['The parameter to_name was deprecated'
729
' in version 0.13. Use to_dir instead'],
730
tree.move, ['a1'], to_name='sub1',