def test_wsgi_script_run(self):
"""Test that we install a runnable wsgi script.
This test actually attempts to start and interact with the
wsgi script in question to demonstrate that it's a working
wsgi script using simple server. It's a bit hokey because of
process management that has to be done.
"""
self.skipTest("Test skipped until we can determine a reliable "
"way to capture subprocess stdout without blocking")
if os.name == 'nt':
self.skipTest('Windows support is passthrough')
stdout, _, return_code = self.run_setup(
'install', '--prefix=%s' % self.temp_dir)
self.useFixture(
fixtures.EnvironmentVariable(
'PYTHONPATH', ".:%s/lib/python%s.%s/site-packages" % (
self.temp_dir,
sys.version_info[0],
sys.version_info[1])))
# NOTE(sdague): making python unbuffered is critical to
# getting output out of the subprocess.
self.useFixture(
fixtures.EnvironmentVariable(
'PYTHONUNBUFFERED', '1'))
self._check_wsgi_install_content(stdout)
# Live test run the scripts and see that they respond to wsgi
# requests.
self._test_wsgi()
test_wsgi.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录