[MERGE] win32 simple fix: fix creating config_dir in selftest

Alexander Belchenko bialix at ukr.net
Mon Jun 26 07:51:21 BST 2006


Aaron Bentley пишет:
> Alexander Belchenko wrote:
>> This patch fixes creating config_dir on win32 in one test.
> 
> Thanks for your patch, but we've got a special function for making sure
> the config dir exists:
> 
> bzrlib.config.ensure_config_dir_exists.
> 
> So all things being equal, I'd rather use that than makedirs.

OK. Changed a bit. I think you mean this:

=== modified file 'bzrlib/tests/test_config.py'
--- bzrlib/tests/test_config.py	2006-06-21 21:09:04 +0000
+++ bzrlib/tests/test_config.py	2006-06-26 06:46:52 +0000
@@ -473,7 +473,8 @@
          self.assertEqual(parser._calls,
                           [('__init__', config.locations_config_filename(),
                             'utf-8')])
-        os.mkdir(config.config_dir())
+        # on win32 config_dir is complex thing so need to use special 
method
+        config.ensure_config_dir_exists(config.config_dir())
          f = file(config.branches_config_filename(), 'wb')
          f.write('')
          f.close()


--
Alexander





More information about the bazaar mailing list