PKJ5(88zc/__init__.py__import__('pkg_resources').declare_namespace(__name__) PKLX5I?zc/__init__.pyc; Dc@sediedS(s pkg_resourcesN(s __import__sdeclare_namespaces__name__(((s)build/bdist.linux-i686/egg/zc/__init__.pys?sPKJ5(88zc/recipe/__init__.py__import__('pkg_resources').declare_namespace(__name__) PKLX5xzc/recipe/__init__.pyc; Dc@sediedS(s pkg_resourcesN(s __import__sdeclare_namespaces__name__(((s0build/bdist.linux-i686/egg/zc/recipe/__init__.pys?sPKX5*R7"W W zc/recipe/testrunner/__init__.py############################################################################## # # Copyright (c) 2006 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """A few built-in recipes $Id: __init__.py 70561 2006-10-07 17:10:47Z jim $ """ import os, sys import pkg_resources import zc.buildout.easy_install import zc.recipe.egg class TestRunner: def __init__(self, buildout, name, options): self.buildout = buildout self.name = name self.options = options options['script'] = os.path.join(buildout['buildout']['bin-directory'], options.get('script', self.name), ) self.egg = zc.recipe.egg.Egg(buildout, name, options) def install(self): options = self.options eggs, ws = self.egg.working_set(('zope.testing', )) test_paths = [ws.find(pkg_resources.Requirement.parse(spec)).location for spec in eggs] defaults = options.get('defaults', '').strip() if defaults: defaults = '(%s) + ' % defaults wd = options.get('working-directory', '') if wd: initialization = "import os\nos.chdir(%r)" % wd else: initialization = '' return zc.buildout.easy_install.scripts( [(options['script'], 'zope.testing.testrunner', 'run')], ws, options['executable'], self.buildout['buildout']['bin-directory'], extra_paths=self.egg.extra_paths, arguments = defaults + (arg_template % dict( TESTPATH=repr(test_paths)[1:-1].replace( ', ', ",\n '--test-path', "), )), initialization = initialization, ) update = install arg_template = """[ '--test-path', %(TESTPATH)s, ]""" PKyH5q5.zc/recipe/testrunner/tests.py############################################################################## # # Copyright (c) 2006 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## import os, re, shutil, sys, tempfile import pkg_resources import zc.buildout.testing import zc.recipe.egg import unittest import zope.testing from zope.testing import doctest, renormalizing def dirname(d, level=1): if level == 0: return d return dirname(os.path.dirname(d), level-1) def setUp(test): zc.buildout.testing.buildoutSetUp(test) zc.buildout.testing.install_develop('zc.recipe.testrunner', test) zc.buildout.testing.install_develop('zc.recipe.egg', test) zc.buildout.testing.install('zope.testing', test) def test_suite(): return unittest.TestSuite(( #doctest.DocTestSuite(), doctest.DocFileSuite( 'README.txt', setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown, checker=renormalizing.RENormalizing([ zc.buildout.testing.normalize_path, zc.buildout.testing.normalize_script, zc.buildout.testing.normalize_egg_py, (re.compile('#!\S+python\S*'), '#!python'), (re.compile('\d[.]\d+ seconds'), '0.001 seconds'), (re.compile('zope.testing-[^-]+-'), 'zope.testing-X-'), (re.compile('setuptools-[^-]+-'), 'setuptools-X-'), ]) ), )) if __name__ == '__main__': unittest.main(defaultTest='test_suite') PKX5 w/#/#zc/recipe/testrunner/README.txtTest-Runner Recipe ================== The test-runner recipe, zc.recipe.testrunner, creates a test runner for a project. The test-runner recipe has several options: eggs The eggs option specified a list of eggs to test given as one ore more setuptools requirement strings. Each string must be given on a separate line. script The script option gives the name of the script to generate, in the buildout bin directory. Of the option isn't used, the part name will be used. extra-paths One or more extra paths to include in the generated test script. defaults The defaults option lets you specify testrunner default options. These are specified as Python source for an expression yielding a list, typically a list literal. working-directory The working-directory option lets to specify a directory where the tests will run. The testrunner will change to this directory whe run. (Note that, at this time, due to limitations in the Zope test runner, the distributions cannot be zip files. TODO: Fix the test runner!) To illustrate this, we'll create a pair of projects in our sample buildout: >>> mkdir(sample_buildout, 'demo') >>> mkdir(sample_buildout, 'demo', 'demo') >>> write(sample_buildout, 'demo', 'demo', '__init__.py', '') >>> write(sample_buildout, 'demo', 'demo', 'tests.py', ... ''' ... import unittest ... ... class TestDemo(unittest.TestCase): ... def test(self): ... pass ... ... def test_suite(): ... return unittest.makeSuite(TestDemo) ... ''') >>> write(sample_buildout, 'demo', 'setup.py', ... """ ... from setuptools import setup ... ... setup(name = "demo") ... """) >>> write(sample_buildout, 'demo', 'README.txt', '') >>> mkdir(sample_buildout, 'demo2') >>> mkdir(sample_buildout, 'demo2', 'demo2') >>> write(sample_buildout, 'demo2', 'demo2', '__init__.py', '') >>> write(sample_buildout, 'demo2', 'demo2', 'tests.py', ... ''' ... import unittest ... ... class Demo2Tests(unittest.TestCase): ... def test2(self): ... pass ... ... def test_suite(): ... return unittest.makeSuite(Demo2Tests) ... ''') >>> write(sample_buildout, 'demo2', 'setup.py', ... """ ... from setuptools import setup ... ... setup(name = "demo2", install_requires= ['demoneeded']) ... """) >>> write(sample_buildout, 'demo2', 'README.txt', '') Demo 2 depends on demoneeded: >>> mkdir(sample_buildout, 'demoneeded') >>> mkdir(sample_buildout, 'demoneeded', 'demoneeded') >>> write(sample_buildout, 'demoneeded', 'demoneeded', '__init__.py', '') >>> write(sample_buildout, 'demoneeded', 'demoneeded', 'tests.py', ... ''' ... import unittest ... ... class TestNeeded(unittest.TestCase): ... def test_needed(self): ... pass ... ... def test_suite(): ... return unittest.makeSuite(TestNeeded) ... ''') >>> write(sample_buildout, 'demoneeded', 'setup.py', ... """ ... from setuptools import setup ... ... setup(name = "demoneeded") ... """) >>> write(sample_buildout, 'demoneeded', 'README.txt', '') We'll update our buildout to install the demo project as a develop egg and to create the test script: >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo demoneeded demo2 ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = ... demo ... demo2 ... script = test ... """) Note that we specified both demo and demo2 in the eggs option and that we put them on separate lines. We also specified the offline option to run the buildout in offline mode. Now when we run the buildout: >>> import os >>> os.chdir(sample_buildout) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), We get a test script installed in our bin directory: >>> ls(sample_buildout, 'bin') - buildout - test We can run the test script to run our demo test: >>> print system(os.path.join(sample_buildout, 'bin', 'test') + ' -vv'), Running tests at level 1 Running unit tests: Running: test (demo.tests.TestDemo) test2 (demo2.tests.Demo2Tests) Ran 2 tests with 0 failures and 0 errors in 0.000 seconds. Note that we didn't run the demoneeded tests. Tests are only run for the eggs listed, not for their dependencies. If we leave the script option out of the configuration, then the test script will get it's name from the part: >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = demo ... """) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), >>> ls(sample_buildout, 'bin') - buildout - testdemo We can run the test script to run our demo test: >>> print system(os.path.join(sample_buildout, 'bin', 'testdemo') + ' -q'), Running unit tests: Ran 1 tests with 0 failures and 0 errors in 0.000 seconds. If we need to include other paths in our test script, we can use the extra-paths option to specify them: >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = demo ... extra-paths = /usr/local/zope/lib/python ... """) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), >>> cat(sample_buildout, 'bin', 'testdemo') #!/usr/local/bin/python2.4 import sys sys.path[0:0] = [ '/sample-buildout/demo', '/sample-buildout/eggs/zope.testing-3.0-py2.3.egg', '/sample-buildout/eggs/setuptools-0.6-py1.3.egg', '/usr/local/zope/lib/python', ] import zope.testing.testrunner if __name__ == '__main__': zope.testing.testrunner.run([ '--test-path', '/sample-buildout/demo', ]) We can use the working-directory option to specify an working directory: >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = demo ... extra-paths = /usr/local/zope/lib/python ... working-directory = /foo/bar ... """) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), >>> cat(sample_buildout, 'bin', 'testdemo') #!/usr/local/bin/python2.4 import sys sys.path[0:0] = [ '/sample-buildout/demo', '/sample-buildout/eggs/zope.testing-3.0-py2.3.egg', '/sample-buildout/eggs/setuptools-0.6-py1.3.egg', '/usr/local/zope/lib/python', ] import os os.chdir('/foo/bar') import zope.testing.testrunner if __name__ == '__main__': zope.testing.testrunner.run([ '--test-path', '/sample-buildout/demo', ]) If we need to specify default options, we can use the defaults option. For example, Zope 3 applications typically define test suites in modules named ftests or tests. The default test runner behaviour is to look in modules named tests. To specify that we want to look in tests and ftests module, we'd supply a default for the --tests-pattern option. If we like dots, we could also request more verbose output using the -v option. >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = demo ... extra-paths = /usr/local/zope/lib/python ... defaults = ['--tests-pattern', '^f?tests$', ... '-v' ... ] ... """) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), >>> cat(sample_buildout, 'bin', 'testdemo') #!/usr/local/bin/python2.4 import sys sys.path[0:0] = [ '/sample-buildout/demo', '/sample-buildout/eggs/zope.testing-3.0-py2.4.egg', '/sample-buildout/eggs/setuptools-0.6-py1.3.egg', '/usr/local/zope/lib/python', ] import zope.testing.testrunner if __name__ == '__main__': zope.testing.testrunner.run((['--tests-pattern', '^f?tests$', '-v' ]) + [ '--test-path', '/tmp/tmpef05fA/_TEST_/sample-buildout/demo', ]) Some things to note from this example: - Parentheses are placed around the given expression. - Leading whitespace is removed. PKLX5Y !zc/recipe/testrunner/__init__.pyc; k>Ec@sPdZdkZdkZdkZdkZdkZdfdYZdZdS(sJA few built-in recipes $Id: __init__.py 70561 2006-10-07 17:10:47Z jim $ Ns TestRunnercBs tZdZdZeZRS(NcCsm||_||_||_tii|dd|id|i|d|i}|iidf\}}gi}|D](}||i t i i |i q2~}|iddi} | od| } n|idd}|od|}nd}tiii|ddd fg||d |id d d |iid| ttdt|dd!iddd|SdS(Ns zope.testingsdefaultsss(%s) + sworking-directorysimport os os.chdir(%r)sscriptszope.testing.testrunnersruns executablesbuildouts bin-directorys extra_pathss argumentssTESTPATHiis, s, '--test-path', sinitialization(sselfsoptionsseggs working_setseggsswssappends_[1]sspecsfinds pkg_resourcess Requirementsparseslocations test_pathssgetsstripsdefaultsswdsinitializationszcsbuildouts easy_installsscriptss extra_pathss arg_templatesdictsreprsreplace( sselfsinitializationswdseggssspecsoptionss_[1]s test_pathsswssdefaults((s;build/bdist.linux-i686/egg/zc/recipe/testrunner/__init__.pysinstall#s  ?  0(s__name__s __module__s__init__sinstallsupdate(((s;build/bdist.linux-i686/egg/zc/recipe/testrunner/__init__.pys TestRunners s$[ '--test-path', %(TESTPATH)s, ]( s__doc__sosssyss pkg_resourcesszc.buildout.easy_installszcs zc.recipe.eggs TestRunners arg_template(s TestRunners pkg_resourcesszcssyss arg_templatesos((s;build/bdist.linux-i686/egg/zc/recipe/testrunner/__init__.pys?s    *PKLX5HYqzc/recipe/testrunner/tests.pyc; M)Ec@sdkZdkZdkZdkZdkZdkZdkZdkZdk Z dk Z dk l Z l Z ddZdZdZedjoe iddndS( N(sdoctests renormalizingicCs6|djo|Snttii||dSdS(Nii(slevelsdsdirnamesosspath(sdslevel((s8build/bdist.linux-i686/egg/zc/recipe/testrunner/tests.pysdirnames cCsYtiii|tiiid|tiiid|tiiid|dS(Nszc.recipe.testrunners zc.recipe.eggs zope.testing(szcsbuildoutstestings buildoutSetUpstestsinstall_developsinstall(stest((s8build/bdist.linux-i686/egg/zc/recipe/testrunner/tests.pyssetUpscCstitiddtdtiiidt i tiii tiii tiii tiddftiddftid d ftid d fgfSdS( Ns README.txtssetUpstearDownscheckers#!\S+python\S*s#!pythons\d[.]\d+ secondss 0.001 secondsszope.testing-[^-]+-szope.testing-X-ssetuptools-[^-]+-s setuptools-X-(sunittests TestSuitesdoctests DocFileSuitessetUpszcsbuildoutstestingsbuildoutTearDowns renormalizings RENormalizingsnormalize_pathsnormalize_scriptsnormalize_egg_pysrescompile(((s8build/bdist.linux-i686/egg/zc/recipe/testrunner/tests.pys test_suite#ss__main__s defaultTests test_suite(sossresshutilssysstempfiles pkg_resourcesszc.buildout.testingszcs zc.recipe.eggsunittests zope.testingszopesdoctests renormalizingsdirnamessetUps test_suites__name__smain(sdirnamestempfilesunittests pkg_resourcesszcssyssres test_suites renormalizingsdoctestszopesshutilsosssetUp((s8build/bdist.linux-i686/egg/zc/recipe/testrunner/tests.pys?s-         PKLX5y11EGG-INFO/PKG-INFOMetadata-Version: 1.0 Name: zc.recipe.testrunner Version: 1.0.0b4 Summary: ZC Buildout recipe for creating test runners Home-page: http://svn.zope.org/zc.buildout Author: Jim Fulton Author-email: jim@zope.com License: ZPL 2.1 Description: ****************** Test-Runner Recipe ****************** .. contents:: This recipe generates zope.testing test-runenr scripts for testing a collection of eggs. The eggs must already be installed (using the zc.recipe.egg recipe) Change History ************** 1.0.0b4 (2006-10-24) ==================== Feature Changes --------------- - Added a working-directoy option to specify a working directory for the generated script. 1.0.0b3 (2006-10-16) ==================== Updated to work with (not get a warning from) zc.buildout 1.0.0b10. 1.0.0b2 ======= Added a defaults option to specify testrunner default options. 1.0.0b1 ======= Updated to work with zc.buildout 1.0.0b5. 1.0.0a3 ======= Added a defaults option that lets you specify test-runner default options. 1.0.0a2 ======= Now provide a extra-paths option for including extra paths in test scripts. This is useful when eggs depend on Python packages not packaged as eggs. 1.0.0a1 ======= Initial public version Detailed Documentation ********************** Test-Runner Recipe ================== The test-runner recipe, zc.recipe.testrunner, creates a test runner for a project. The test-runner recipe has several options: eggs The eggs option specified a list of eggs to test given as one ore more setuptools requirement strings. Each string must be given on a separate line. script The script option gives the name of the script to generate, in the buildout bin directory. Of the option isn't used, the part name will be used. extra-paths One or more extra paths to include in the generated test script. defaults The defaults option lets you specify testrunner default options. These are specified as Python source for an expression yielding a list, typically a list literal. working-directory The working-directory option lets to specify a directory where the tests will run. The testrunner will change to this directory whe run. (Note that, at this time, due to limitations in the Zope test runner, the distributions cannot be zip files. TODO: Fix the test runner!) To illustrate this, we'll create a pair of projects in our sample buildout: >>> mkdir(sample_buildout, 'demo') >>> mkdir(sample_buildout, 'demo', 'demo') >>> write(sample_buildout, 'demo', 'demo', '__init__.py', '') >>> write(sample_buildout, 'demo', 'demo', 'tests.py', ... ''' ... import unittest ... ... class TestDemo(unittest.TestCase): ... def test(self): ... pass ... ... def test_suite(): ... return unittest.makeSuite(TestDemo) ... ''') >>> write(sample_buildout, 'demo', 'setup.py', ... """ ... from setuptools import setup ... ... setup(name = "demo") ... """) >>> write(sample_buildout, 'demo', 'README.txt', '') >>> mkdir(sample_buildout, 'demo2') >>> mkdir(sample_buildout, 'demo2', 'demo2') >>> write(sample_buildout, 'demo2', 'demo2', '__init__.py', '') >>> write(sample_buildout, 'demo2', 'demo2', 'tests.py', ... ''' ... import unittest ... ... class Demo2Tests(unittest.TestCase): ... def test2(self): ... pass ... ... def test_suite(): ... return unittest.makeSuite(Demo2Tests) ... ''') >>> write(sample_buildout, 'demo2', 'setup.py', ... """ ... from setuptools import setup ... ... setup(name = "demo2", install_requires= ['demoneeded']) ... """) >>> write(sample_buildout, 'demo2', 'README.txt', '') Demo 2 depends on demoneeded: >>> mkdir(sample_buildout, 'demoneeded') >>> mkdir(sample_buildout, 'demoneeded', 'demoneeded') >>> write(sample_buildout, 'demoneeded', 'demoneeded', '__init__.py', '') >>> write(sample_buildout, 'demoneeded', 'demoneeded', 'tests.py', ... ''' ... import unittest ... ... class TestNeeded(unittest.TestCase): ... def test_needed(self): ... pass ... ... def test_suite(): ... return unittest.makeSuite(TestNeeded) ... ''') >>> write(sample_buildout, 'demoneeded', 'setup.py', ... """ ... from setuptools import setup ... ... setup(name = "demoneeded") ... """) >>> write(sample_buildout, 'demoneeded', 'README.txt', '') We'll update our buildout to install the demo project as a develop egg and to create the test script: >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo demoneeded demo2 ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = ... demo ... demo2 ... script = test ... """) Note that we specified both demo and demo2 in the eggs option and that we put them on separate lines. We also specified the offline option to run the buildout in offline mode. Now when we run the buildout: >>> import os >>> os.chdir(sample_buildout) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), We get a test script installed in our bin directory: >>> ls(sample_buildout, 'bin') - buildout - test We can run the test script to run our demo test: >>> print system(os.path.join(sample_buildout, 'bin', 'test') + ' -vv'), Running tests at level 1 Running unit tests: Running: test (demo.tests.TestDemo) test2 (demo2.tests.Demo2Tests) Ran 2 tests with 0 failures and 0 errors in 0.000 seconds. Note that we didn't run the demoneeded tests. Tests are only run for the eggs listed, not for their dependencies. If we leave the script option out of the configuration, then the test script will get it's name from the part: >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = demo ... """) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), >>> ls(sample_buildout, 'bin') - buildout - testdemo We can run the test script to run our demo test: >>> print system(os.path.join(sample_buildout, 'bin', 'testdemo') + ' -q'), Running unit tests: Ran 1 tests with 0 failures and 0 errors in 0.000 seconds. If we need to include other paths in our test script, we can use the extra-paths option to specify them: >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = demo ... extra-paths = /usr/local/zope/lib/python ... """) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), >>> cat(sample_buildout, 'bin', 'testdemo') #!/usr/local/bin/python2.4 import sys sys.path[0:0] = [ '/sample-buildout/demo', '/sample-buildout/eggs/zope.testing-3.0-py2.3.egg', '/sample-buildout/eggs/setuptools-0.6-py1.3.egg', '/usr/local/zope/lib/python', ] import zope.testing.testrunner if __name__ == '__main__': zope.testing.testrunner.run([ '--test-path', '/sample-buildout/demo', ]) We can use the working-directory option to specify an working directory: >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = demo ... extra-paths = /usr/local/zope/lib/python ... working-directory = /foo/bar ... """) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), >>> cat(sample_buildout, 'bin', 'testdemo') #!/usr/local/bin/python2.4 import sys sys.path[0:0] = [ '/sample-buildout/demo', '/sample-buildout/eggs/zope.testing-3.0-py2.3.egg', '/sample-buildout/eggs/setuptools-0.6-py1.3.egg', '/usr/local/zope/lib/python', ] import os os.chdir('/foo/bar') import zope.testing.testrunner if __name__ == '__main__': zope.testing.testrunner.run([ '--test-path', '/sample-buildout/demo', ]) If we need to specify default options, we can use the defaults option. For example, Zope 3 applications typically define test suites in modules named ftests or tests. The default test runner behaviour is to look in modules named tests. To specify that we want to look in tests and ftests module, we'd supply a default for the --tests-pattern option. If we like dots, we could also request more verbose output using the -v option. >>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... develop = demo ... parts = testdemo ... offline = true ... ... [testdemo] ... recipe = zc.recipe.testrunner ... eggs = demo ... extra-paths = /usr/local/zope/lib/python ... defaults = ['--tests-pattern', '^f?tests$', ... '-v' ... ] ... """) >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'), >>> cat(sample_buildout, 'bin', 'testdemo') #!/usr/local/bin/python2.4 import sys sys.path[0:0] = [ '/sample-buildout/demo', '/sample-buildout/eggs/zope.testing-3.0-py2.4.egg', '/sample-buildout/eggs/setuptools-0.6-py1.3.egg', '/usr/local/zope/lib/python', ] import zope.testing.testrunner if __name__ == '__main__': zope.testing.testrunner.run((['--tests-pattern', '^f?tests$', '-v' ]) + [ '--test-path', '/tmp/tmpef05fA/_TEST_/sample-buildout/demo', ]) Some things to note from this example: - Parentheses are placed around the given expression. - Leading whitespace is removed. Download ********************** Keywords: development build testing Platform: UNKNOWN Classifier: Framework :: Buildout Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Zope Public License Classifier: Topic :: Software Development :: Build Tools Classifier: Topic :: Software Development :: Libraries :: Python Modules PKLX5݌EGG-INFO/SOURCES.txtCHANGES.txt README.txt setup.py src/zc/__init__.py src/zc.recipe.testrunner.egg-info/PKG-INFO src/zc.recipe.testrunner.egg-info/SOURCES.txt src/zc.recipe.testrunner.egg-info/dependency_links.txt src/zc.recipe.testrunner.egg-info/entry_points.txt src/zc.recipe.testrunner.egg-info/namespace_packages.txt src/zc.recipe.testrunner.egg-info/requires.txt src/zc.recipe.testrunner.egg-info/top_level.txt src/zc/recipe/__init__.py src/zc/recipe/testrunner/README.txt src/zc/recipe/testrunner/__init__.py src/zc/recipe/testrunner/tests.py PKLX52EGG-INFO/dependency_links.txt PKLX5$ #99EGG-INFO/entry_points.txt[zc.buildout] default = zc.recipe.testrunner:TestRunner PKLX5[M EGG-INFO/namespace_packages.txtzc zc.recipe PKLX5ft;HHEGG-INFO/requires.txtzc.buildout >=1.0.0b12 zope.testing setuptools zc.recipe.egg >=1.0.0a3PKLX5"EGG-INFO/top_level.txtzc PKLX52EGG-INFO/zip-safe PKJ5(88zc/__init__.pyPKLX5I?dzc/__init__.pycPKJ5(88azc/recipe/__init__.pyPKLX5xzc/recipe/__init__.pycPKX5*R7"W W zc/recipe/testrunner/__init__.pyPKyH5q5.l zc/recipe/testrunner/tests.pyPKX5 w/#/#zzc/recipe/testrunner/README.txtPKLX5Y !7zc/recipe/testrunner/__init__.pycPKLX5HYqAzc/recipe/testrunner/tests.pycPKLX5y11JEGG-INFO/PKG-INFOPKLX5݌|EGG-INFO/SOURCES.txtPKLX52EGG-INFO/dependency_links.txtPKLX5$ #99?EGG-INFO/entry_points.txtPKLX5[M EGG-INFO/namespace_packages.txtPKLX5ft;HHEGG-INFO/requires.txtPKLX5"tEGG-INFO/top_level.txtPKLX52EGG-INFO/zip-safePKۀ