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