golden hour
/usr/lib/python2.7/site-packages/zope/component/tests
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.py
16 B
Del
OK
__init__.pyc
152 B
Del
OK
__init__.pyo
152 B
Del
OK
examples.py
3.16 KB
Del
OK
examples.pyc
7.99 KB
Del
OK
examples.pyo
7.99 KB
Del
OK
test___init__.py
3.12 KB
Del
OK
test___init__.pyc
5.24 KB
Del
OK
test___init__.pyo
5.24 KB
Del
OK
test__api.py
41.84 KB
Del
OK
test__api.pyc
74.24 KB
Del
OK
test__api.pyo
74.24 KB
Del
OK
test__declaration.py
7.01 KB
Del
OK
test__declaration.pyc
12.41 KB
Del
OK
test__declaration.pyo
12.41 KB
Del
OK
test_event.py
2.3 KB
Del
OK
test_event.pyc
2.85 KB
Del
OK
test_event.pyo
2.85 KB
Del
OK
test_factory.py
3.7 KB
Del
OK
test_factory.pyc
6.09 KB
Del
OK
test_factory.pyo
6.09 KB
Del
OK
test_globalregistry.py
8.47 KB
Del
OK
test_globalregistry.pyc
14.39 KB
Del
OK
test_globalregistry.pyo
14.29 KB
Del
OK
test_hookable.py
4 KB
Del
OK
test_hookable.pyc
6.62 KB
Del
OK
test_hookable.pyo
6.62 KB
Del
OK
test_hooks.py
11.42 KB
Del
OK
test_hooks.pyc
17.43 KB
Del
OK
test_hooks.pyo
17.43 KB
Del
OK
test_interface.py
14.15 KB
Del
OK
test_interface.pyc
23.29 KB
Del
OK
test_interface.pyo
23.29 KB
Del
OK
test_persistentregistry.py
6.27 KB
Del
OK
test_persistentregistry.pyc
8.41 KB
Del
OK
test_persistentregistry.pyo
8.41 KB
Del
OK
test_registry.py
4.55 KB
Del
OK
test_registry.pyc
7.34 KB
Del
OK
test_registry.pyo
7.34 KB
Del
OK
test_security.py
9.15 KB
Del
OK
test_security.pyc
16.49 KB
Del
OK
test_security.pyo
16.49 KB
Del
OK
test_standalone.py
1.99 KB
Del
OK
test_standalone.pyc
1.77 KB
Del
OK
test_standalone.pyo
1.77 KB
Del
OK
test_zcml.py
47.22 KB
Del
OK
test_zcml.pyc
56.41 KB
Del
OK
test_zcml.pyo
56.41 KB
Del
OK
Edit: test_standalone.py
############################################################################## # # Copyright (c) 2001, 2002, 2009 Zope Foundation 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. # ############################################################################## """Component Architecture Tests """ import unittest class StandaloneTests(unittest.TestCase): def testStandalone(self): # See: https://bugs.launchpad.net/zope3/+bug/98401 import subprocess import sys import os import pickle executable = os.path.abspath(sys.executable) where = os.path.dirname(os.path.dirname(__file__)) program = os.path.join(where, 'standalonetests.py') process = subprocess.Popen([executable, program], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE) pickle.dump(sys.path, process.stdin) process.stdin.close() try: rc = process.wait() except OSError as e: if e.errno != 4: # MacIntel raises apparently unimportant EINTR? raise # TODO verify sanity of a pass on EINTR :-/ if rc != 0: output = process.stdout.read() output = output.decode() if isinstance(output, bytes) else output sys.stderr.write('#' * 80 + '\n') sys.stdout.write(output) sys.stderr.write('#' * 80 + '\n') self.fail('Output code: %d' % rc) def test_suite(): return unittest.TestSuite(( unittest.makeSuite(StandaloneTests), ))
Save