You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by jg...@apache.org on 2006/03/11 22:43:06 UTC
svn commit: r385177 - in /httpd/mod_python/trunk/test: htdocs/tests.py
test.py
Author: jgallacher
Date: Sat Mar 11 13:43:05 2006
New Revision: 385177
URL: http://svn.apache.org/viewcvs?rev=385177&view=rev
Log:
Fixed unit tests to be compatible with the use of
PythonOption mod_python.mutex_directory. The unit tests can now
use a different mutex_directory, and there will not interfere with
a running apache instance. (MODPYTHON-131).
Modified:
httpd/mod_python/trunk/test/htdocs/tests.py
httpd/mod_python/trunk/test/test.py
Modified: httpd/mod_python/trunk/test/htdocs/tests.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/test/htdocs/tests.py?rev=385177&r1=385176&r2=385177&view=diff
==============================================================================
--- httpd/mod_python/trunk/test/htdocs/tests.py (original)
+++ httpd/mod_python/trunk/test/htdocs/tests.py Sat Mar 11 13:43:05 2006
@@ -1011,6 +1011,12 @@
def PythonOption_items(req):
options = req.get_options().items()
+
+ # The tests may using PythonOption mod_python.* in the test configuration
+ # We need to remove those particular options so they don't interfer
+ # with this test result.
+ options = [ o for o in options if not o[0].startswith('mod_python') ]
+
options.sort()
req.write(str(options))
return apache.OK
Modified: httpd/mod_python/trunk/test/test.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/test/test.py?rev=385177&r1=385176&r2=385177&view=diff
==============================================================================
--- httpd/mod_python/trunk/test/test.py (original)
+++ httpd/mod_python/trunk/test/test.py Sat Mar 11 13:43:05 2006
@@ -320,6 +320,7 @@
PidFile("logs/httpd.pid"),
ServerName("127.0.0.1"),
Listen(PORT),
+ PythonOption('mod_python.mutex_directory %s' % TMP_DIR),
PythonOption('PythonOptionTest sample_value'),
DocumentRoot(DOCUMENT_ROOT),
LoadModule("python_module %s" % quoteIfSpace(MOD_PYTHON_SO)))
@@ -1634,6 +1635,7 @@
SetHandler("mod_python"),
PythonHandler("tests"),
PythonOption('PythonOptionTest ""'),
+ PythonOption('mod_python.mutex_directory ""'),
PythonOption("testing 123"),
PythonDebug("On")))
return str(c)