Please use:

os.path.normpath(dirname)

instead of string replacements this guarantees cross platform compatibly.

Florent.

On 8/29/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>  Author: deets
>  Date: Thu Aug 28 17:43:37 2008
>  New Revision: 5295
>  URL: http://trac.turbogears.org/changeset/5295
>
>  Log:
>  fixed bug that at least under unix made app config not being loaded under 
> tests
>
>  Modified:
>    branches/1.1/turbogears/testutil.py
>
>  Modified: branches/1.1/turbogears/testutil.py
>  
> ==============================================================================
>  --- branches/1.1/turbogears/testutil.py (original)
>  +++ branches/1.1/turbogears/testutil.py Thu Aug 28 17:43:37 2008
>  @@ -48,12 +48,12 @@
>      for dirpath, dirs, dummy2 in os.walk('.'):
>          basename = os.path.basename(dirpath)
>          dirname = os.path.dirname(dirpath)
>  +        if dirname.startswith("./"):
>  +            dirname = dirname[2:]
>          init_py = os.path.join(dirpath, '__init__.py')
>          if basename == 'config' and os.path.exists(init_py) and \
>                  dirname[0] in string.ascii_letters + '_':
>              modulename = "%s.app" % dirpath[2:].replace(os.sep, ".")
>  -    else:
>  -        modulename = None
>      update_config(configfile="test.cfg", modulename=modulename)
>   else:
>      database.set_db_uri("sqlite:///:memory:")
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to