#2043: Revisit loading of test configuration in turbogears.testutil
-------------------------+--------------------------------------------------
 Reporter:  Chris Arndt  |       Owner:  faide   
     Type:  task         |      Status:  new     
 Priority:  normal       |   Milestone:  1.1     
Component:  Tests        |     Version:  1.0.7   
 Severity:  normal       |    Keywords:  testutil
-------------------------+--------------------------------------------------
 The code in `turbogears.testutil` to load the configuartion from
 `test.cfg` and from the application's `config` package is very dodgy and
 should be improved and refactored.

 Problems:

   * Code runs on importing the module, which IMHO is not so good. Maybe we
 should only load the configuration when starting TurboGears in
 `testutil.start_server`.
   * The code looks through all sub-directories of the current working
 directory for a Python package named `config` and, when found, passed this
 to `pkg_resources` (via `config.update_config`), but it doesn't check
 whether the package is actually on the Python path. This leads to an error
 when your ''project'' directory has a sub-directory (and not below the
 application's 'package' directory), which contains a `config` package
 (which normally is not on the Python path).
   * The current code to check whether a potential package directory's
 filename contains invalid Python identitifier chars is not correct.

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2043>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to