Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2043 (closed task: migrated)

Opened 11 years ago

Last modified 8 years ago

Revisit loading of test configuration in turbogears.testutil

Reported by: Chris Arndt Owned by: faide
Priority: normal Milestone: 1.1.x bugfix
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.


  • 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.

Change History

comment:1 Changed 11 years ago by Chris Arndt

Added a fix for the third problem mentioned above and a temporary workaround for the second in r5708.

But we should still rethink the whole test configuration loading approach.

comment:2 Changed 10 years ago by Chris Arndt

  • Milestone changed from 1.1 to 1.1.x bugfix

Moving to 1.1.x bugfix release in preparation for 1.1rc1 release.

comment:3 Changed 8 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to migrated
Note: See TracTickets for help on using tickets.