[mod_python] test_psp_error, test_import, test_psphandler fails - win32

SatheeshKumar Mohan skumar at spikesource.com
Thu May 15 03:58:59 EDT 2008


Hi,
I have mod_python installed and apache server servers mptest.py(that 
says hello world).

Apache:
Server version: Apache/2.2.8 (Win32)
Server built:   Mar 30 2008 23:17:06

Python:
2.5.1

Mod_python:
mod_python-3.3.1

The whole things runs on cygwin.

I have edited testconf.py setting values for
HTTPD
TESTHOME
LIBEXECDIR,
MOD_PYTHON_SO

on running python test.py the following tests are failing.. somebody 
help! whats been wrong. how to solve this. why is it failing. what is 
missing in the installation

* Testing file upload with \r char 
E..............................................F..F.F....................
======================================================================
FAIL: test_import (__main__.PerRequestTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 1674, in test_import
    self.fail(`rsp`)
AssertionError: '\n<pre>\nMOD_PYTHON ERROR\n\nProcessId:      
1200\nInterpreter:    \'test_import\'\n\nServerName:     
\'test_import\'\nDocumentRoot:   
\'C:/testcases/mod_python/htdocs\'\n\nURI:            
\'/tests.py\'\nLocation:       None\nDirectory:      
\'C:/testcases/mod_python/htdocs/\'\nFilename:       
\'C:/testcases/mod_python/htdocs/tests.py\'\nPathInfo:       
\'\'\n\nPhase:          \'PythonHandler\'\nHandler:        
\'tests::import_test\'\n\nTraceback (most recent call last):\n\n  File 
"c:\\spikesource\\opt\\spikesource\\share\\python2.5\\Lib\\site-packages\\mod_python\\importer.py", 
line 1537, in HandlerDispatch\n    default=default_handler, arg=req, 
silent=hlist.silent)\n\n  File 
"c:\\spikesource\\opt\\spikesource\\share\\python2.5\\Lib\\site-packages\\mod_python\\importer.py", 
line 1229, in _process_target\n    result = _execute_target(config, req, 
object, arg)\n\n  File 
"c:\\spikesource\\opt\\spikesource\\share\\python2.5\\Lib\\site-packages\\mod_python\\importer.py", 
line 1128, in _execute_target\n    result = object(arg)\n\n  File 
"C:\\testcases\\mod_python\\htdocs\\tests.py", line 1024, in 
import_test\n    assert(map(os.path.normpath, sys.path).count(directory) 
== 1)\n\nAssertionError\n\n\nMODULE CACHE DETAILS\n\nAccessed:       Wed 
May 14 23:42:12 2008\nGeneration:     
0\n\n_mp_a10d030a5fcc032f01749cad7f316362 {\n  FileName:     
\'C:\\\\testcases\\\\mod_python\\\\htdocs\\\\tests.py\'\n  Instance:     
1 [IMPORT]\n  Generation:   1\n  Modified:     Sun Nov 12 19:04:44 
2006\n  Imported:     Wed May 14 23:42:12 2008\n}\n\n</pre>\n'

======================================================================
FAIL: test_psphandler (__main__.PerRequestTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 1847, in test_psphandler
    self.fail(`rsp`)
AssertionError: '\n<pre>\nMOD_PYTHON ERROR\n\nProcessId:      
1200\nInterpreter:    \'test_psphandler\'\n\nServerName:     
\'test_psphandler\'\nDocumentRoot:   
\'C:/testcases/mod_python/htdocs\'\n\nURI:            
\'/psptest.psp\'\nLocation:       None\nDirectory:      
\'C:/testcases/mod_python/htdocs/\'\nFilename:       
\'C:/testcases/mod_python/htdocs/psptest.psp\'\nPathInfo:       
\'\'\n\nPhase:          \'PythonHandler\'\nHandler:        
\'mod_python.psp\'\n\nTraceback (most recent call last):\n\n  File 
"c:\\spikesource\\opt\\spikesource\\share\\python2.5\\Lib\\site-packages\\mod_python\\importer.py", 
line 1537, in HandlerDispatch\n    default=default_handler, arg=req, 
silent=hlist.silent)\n\n  File 
"c:\\spikesource\\opt\\spikesource\\share\\python2.5\\Lib\\site-packages\\mod_python\\importer.py", 
line 1202, in _process_target\n    module = import_module(module_name, 
path=path)\n\n  File 
"c:\\spikesource\\opt\\spikesource\\share\\python2.5\\Lib\\site-packages\\mod_python\\importer.py", 
line 304, in import_module\n    return __import__(module_name, {}, {}, 
[\'*\'])\n\n  File 
"c:\\spikesource\\opt\\spikesource\\share\\python2.5\\Lib\\site-packages\\mod_python\\psp.py", 
line 21, in &lt;module&gt;\n    import apache, Session, util, 
_psp\n\nImportError: No module named _psp\n\n</pre>\n'

======================================================================
FAIL: test_psp_error (__main__.PerRequestTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 1915, in test_psp_error
    self.fail(`rsp`)
AssertionError: '\n<pre>\nMOD_PYTHON ERROR\n\nProcessId:      
1200\nInterpreter:    \'test_psp_error\'\n\nServerName:     
\'test_psp_error\'\nDocumentRoot:   
\'C:/testcases/mod_python/htdocs\'\n\nURI:            
\'/psptest_main.psp\'\nLocation:       NoneThe Apache2.2 service is 
stopping.
The Apache2.2 service has stopped.
in a line at position == readBlockSize
    --> Send + process + receive took 0.000 s
  * Skipping the test for The UNIX-HATERS handbook file upload.
    To make this test, you need to download ugh.pdf from
    http://research.microsoft.com/~daniel/uhh-download.html
    into this script's directory.

  * Testing file upload where length of last line == readBlockSize - 1
    --> Send + process + receive took 0.016 s
  * Testing file upload where length of last line == readBlockSize - 1 
with an extra \r
    --> Send + process + receive took 0.000 s

  * Testing sys.argv definition

-- 
/skumar



More information about the Mod_python mailing list