~pythoneers/ubuntu/lucid/python2.7/ltsppa

« back to all changes in this revision

Viewing changes to Lib/test/test_shutil.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2011-05-30 06:44:23 UTC
  • mfrom: (27.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110530064423-3w1ka5db2ddn48a3
Tags: 2.7.2~rc1-1
* Python 2.7.2 release candidate 1.
* Update libpython symbols file for m68k (Thorsten Glaser). Closes: #627458.
* Apply proposed patch for issue #670664. LP: #357067.

Show diffs side-by-side

added added

removed removed

Lines of Context:
805
805
        self.assertTrue(srcfile._exited_with[0] is None)
806
806
        self.assertTrue(srcfile._raised)
807
807
 
 
808
    def test_move_dir_caseinsensitive(self):
 
809
        # Renames a folder to the same name
 
810
        # but a different case.
 
811
 
 
812
        self.src_dir = tempfile.mkdtemp()
 
813
        dst_dir = os.path.join(
 
814
                os.path.dirname(self.src_dir),
 
815
                os.path.basename(self.src_dir).upper())
 
816
        self.assertNotEqual(self.src_dir, dst_dir)
 
817
 
 
818
        try:
 
819
            shutil.move(self.src_dir, dst_dir)
 
820
            self.assertTrue(os.path.isdir(dst_dir))
 
821
        finally:
 
822
            if os.path.exists(dst_dir):
 
823
                os.rmdir(dst_dir)
 
824
 
 
825
 
808
826
 
809
827
def test_main():
810
828
    test_support.run_unittest(TestShutil, TestMove, TestCopyFile)