~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_script.py

  • Committer: Vincent Ladeuil
  • Date: 2010-01-13 17:21:29 UTC
  • mto: (4956.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4957.
  • Revision ID: v.ladeuil+lp@free.fr-20100113172129-ih6sn8ho6b6pwuab
Use os.rename() and fix some typos.

* bzrlib/tests/test_script.py:
(TestMv.test_move_unknown_file): Check the error case.

* bzrlib/tests/script.py:
(ScriptRunner.do_mv): Us os.rename instead of shutil.move. It's
less powerful but reflects more closely the expected limitations
in the future transport-based implementation.

* NEWS: 
Always sorted in alphabetical order.

Show diffs side-by-side

added added

removed removed

Lines of Context:
423
423
        self.failIfExists('file')
424
424
        self.failUnlessExists('new_name')
425
425
 
 
426
    def test_move_unknown_file(self):
 
427
        self.assertRaises(AssertionError,
 
428
                          self.run_script, '$ mv unknown does-not-exist')
 
429
 
426
430
    def test_move_dir(self):
427
431
        self.run_script("""
428
432
$ mkdir dir
432
436
        self.failIfExists('dir')
433
437
        self.failUnlessExists('new_name')
434
438
        self.failUnlessExists('new_name/file')
435
 
        
 
439
 
436
440
    def test_move_file_into_dir(self):
437
441
        self.run_script("""
438
442
$ mkdir dir