~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/launchpad/scripts/__init__.py

  • Committer: Michael Hudson
  • Date: 2010-03-18 21:30:51 UTC
  • mto: This revision was merged to the branch mainline in revision 10548.
  • Revision ID: michael.hudson@canonical.com-20100318213051-c4dwbywxxcalxtmz
really really always use direct delivery in zopeless tests & renable sampledata-setup.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
            Instead, your test should use the Zopeless layer.
106
106
            """
107
107
 
108
 
    scriptzcmlfilename = os.path.normpath(
109
 
        os.path.join(os.path.dirname(__file__),
110
 
                     os.pardir, os.pardir, os.pardir, os.pardir,
111
 
                     'script.zcml'))
112
 
 
113
 
    scriptzcmlfilename = os.path.abspath(scriptzcmlfilename)
 
108
    if config.instance_name == 'testrunner':
 
109
        scriptzcmlfilename = 'script-testing.zcml'
 
110
    else:
 
111
        scriptzcmlfilename = 'script.zcml'
 
112
 
 
113
    scriptzcmlfilename = os.path.abspath(
 
114
        os.path.join(config.root, scriptzcmlfilename))
 
115
 
114
116
    from zope.configuration import xmlconfig
115
117
 
116
118
    # Hook up custom component architecture calls