226
226
self.failIfExists('b')
227
227
self.assertFileEqual('baz\n', 'a')
229
def test_rename_missing_file(self):
235
osutils._win32_rename('b', 'a')
236
except (IOError, OSError), e:
237
self.assertEqual(errno.ENOENT, e.errno)
238
self.assertFileEqual('foo\n', 'a')
240
def test_rename_missing_dir(self):
243
osutils._win32_rename('b', 'a')
244
except (IOError, OSError), e:
245
self.assertEqual(errno.ENOENT, e.errno)
247
def test_rename_current_dir(self):
250
# You can't rename the working directory
251
# doing rename non-existant . usually
252
# just raises ENOENT, since non-existant
255
osutils._win32_rename('b', '.')
256
except (IOError, OSError), e:
257
self.assertEqual(errno.ENOENT, e.errno)
230
260
class TestSplitLines(TestCase):