You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by Jeff Robbins <je...@livedata.com> on 2006/11/11 14:41:57 UTC
Re: mod_python 3.3.0-dev-20061109 tests on Win32 (update)
for problem #3 below I created the folder 'subdir' under htdocs and the test
passed.
----- Original Message -----
From: "Jeff Robbins" <je...@livedata.com>
To: "python-dev list" <py...@httpd.apache.org>
Sent: Saturday, November 11, 2006 08:31
Subject: mod_python 3.3.0-dev-20061109 tests on Win32
>3 problems found on Win32:
>
>
> 1) _psp didn't build and I don't know how to build it
>
>
> 2) In the 'Testing PythonImport' test, the path separators in the two
> paths being compared are different (no doubt due to Win32 backslash vs
> forward slash issues)
>
> the tests.py code does this:
> directory = os.path.dirname(__file__)
> assert(sys.path.count(directory) == 1)
>
> os.path.dirname(__file__) is
> 'C:\\work\\mod_python-3.3.0-dev-20061109\\test\\htdocs'
>
> yet sys.path has this in it
> 'C:/work/mod_python-3.3.0-dev-20061109/test\\\\htdocs'
>
> so the assert fails since the first string can't be found in sys.path
> (count == 0)
>
>
> 3) in test_interpreter_per_directory() the code does this:
> rsp = self.vhost_get("test_interpreter_per_directory",
> '/subdir/foo.py').upper()
>
> interpreter+'SUBDIR/' is
> 'C:/WORK/MOD_PYTHON-3.3.0-DEV-20061109/TEST/HTDOCS/SUBDIR/'
> rsp is 'C:/WORK/MOD_PYTHON-3.3.0-DEV-20061109/TEST/HTDOCS/'
>
> I don't understand the tests.py code but it looks like in the
> interpreter() code
> def interpreter(req):
> if req.phase == "PythonFixupHandler":
> if req.filename[-1] != '/' and os.path.isdir(req.filename):
> req.write(req.interpreter)
> return apache.DONE
> return apache.OK
> else:
> req.write(req.interpreter)
> return apache.DONE
>
> perhaps the req.filename
> 'C:/work/mod_python-3.3.0-dev-20061109/test/htdocs/subdir' is supposed to
> pass the os.path.isdir() test...but it doesn't. There is no 'subdir'
> folder under htdocs so on Win32, os.path.isdir() returns False. Maybe
> this is an os dependency?
>
>