~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-21 13:36:51 UTC
  • mfrom: (5243.2.1 readdir_cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20100521133651-p62dndo2giy5ls21
(lifeless) Some cleanups to the readdir pyrex code for a little efficiency
 and to avoid compile warnings. (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
        shape = sorted(os.listdir('.'))
185
185
        self.assertEquals(['A', 'B'], shape)
186
186
 
187
 
    def test_rename_error(self):
188
 
        # We wrap os.rename to make it give an error including the filenames
189
 
        # https://bugs.launchpad.net/bzr/+bug/491763
190
 
        err = self.assertRaises(OSError, osutils.rename,
191
 
            'nonexistent', 'target')
192
 
        self.assertContainsString(str(err), 'nonexistent')
193
 
 
194
187
 
195
188
class TestRandChars(tests.TestCase):
196
189
 
1071
1064
        self.assertExpectedBlocks(expected_dirblocks[1:], result)
1072
1065
 
1073
1066
    def test_walkdirs_os_error(self):
1074
 
        # <https://bugs.edge.launchpad.net/bzr/+bug/338653>
 
1067
        # <https://bugs.launchpad.net/bzr/+bug/338653>
1075
1068
        # Pyrex readdir didn't raise useful messages if it had an error
1076
1069
        # reading the directory
1077
1070
        if sys.platform == 'win32':