[Moin-user] 1.6.0 unit test does not seem to work

Stephen Adler adler at stephenadler.com
Sun Jan 27 16:18:13 EST 2008


Guys,

I've just done a fresh install of moin 1.6.0 on a redhat system. (i.e. 
ApacheOnLinux type install) and I get an error message when I try and 
run the unit tests. To run the unit tests, you surf to

http://yourwebsite.com/WikiName?action=test

What I got was the following ugly output.... The rest of the 
installation test seemed to be ok. (i.e. surfing the WikiSandBox, 
editing the page, saving the change, seeing the change, and then surfing 
to RecentChanges and see the page as a recent change.)

Anyone seen this error?

Cheers. Steve.

MoinMoin Diagnosis
======================

Release 1.6.0
Revision release
Python version 2.4.3 (#1, Dec 11 2006, 11:39:03) 
[GCC 4.1.1 20061130 (Red Hat 4.1.1-43)]
Python installed to /usr
PyXML is installed
Python Path:
   /usr/local/wiki/moin/lib/python2.4/site-packages
   /usr/local/wiki/Instances/TestWiki
   /usr/local/wiki/Instances/TestWiki/cgi-bin
   /usr/lib64/python24.zip
   /usr/lib64/python2.4
   /usr/lib64/python2.4/plat-linux2
   /usr/lib64/python2.4/lib-tk
   /usr/lib64/python2.4/lib-dynload
   /usr/lib64/python2.4/site-packages
   /usr/lib64/python2.4/site-packages/Numeric
   /usr/lib64/python2.4/site-packages/gtk-2.0
   /usr/lib/python2.4/site-packages
Checking directories...
    data directory tests OK (set to '/usr/local/wiki/Instances/TestWiki/data')
    user directory tests OK (set to '/usr/local/wiki/Instances/TestWiki/data/user')

Server Environment:
    ONLY AVAILABLE FOR LOCAL REQUESTS ON THIS HOST!

Unit Tests:
<!--: spam
Content-Type: text/html

<body><font style="color: white; font-size: 1px"> -->
<body><font style="color: white; font-size: 1px"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font>
<div class="cgitb">
<script type="text/javascript">
function toggleDebugInfo() {
    var tb = document.getElementById('debug-info');
    if (tb == null) return;
    tb.style.display = tb.style.display ? '' : 'none';
}
</script>
<style type="text/css">
.cgitb {background: #E6EAF0; border: 1px solid #4D6180; direction: ltr;}
.cgitb p {margin: 0.5em 0; padding: 5px 10px; text-align: left;}
.cgitb ol {margin: 0}
.cgitb li {margin: 0.25em 0;}
.cgitb h1, .cgitb h2, .cgitb h3 {padding: 5px 10px; margin: 0; background: #4D6180; color: white;}
.cgitb h1 {font-size: 1.3em;}
.cgitb h2 {font-size: 1em; margin-top: 1em;}
.cgitb h3 {font-size: 1em;}
.cgitb .frames {margin: 0; padding: 0; color: #606060}
.cgitb .frames li {display: block;}
.cgitb .call {padding: 5px 10px; background: #A3B4CC; color: black}
.cgitb .context {padding: 0; font-family: monospace; }
.cgitb .context li {display: block; white-space: pre;}
.cgitb .context li.highlight {background: #C0D3F0; color: black}
.cgitb .variables {padding: 5px 10px; font-family: monospace;}
.cgitb .variables li {display: inline;}
.cgitb .variables li:after {content: ", ";}
.cgitb .variables li:last-child:after {content: "";}
.cgitb .exception {border: 1px solid #4D6180; margin: 10px}
.cgitb .exception h3 {background: #4D6180; color: white;}
.cgitb .exception p {color: black;}
.cgitb .exception ul {padding: 0 10px; font-family: monospace;}
.cgitb .exception li {display: block;}

.cgitb .buttons {margin: 0.5em 0; padding: 5px 10px;}        
.cgitb .buttons li {display: inline; margin: 0; padding: 0 0.25em;}
</style><h1>AttributeError</h1>
<p>'module' object has no attribute 'run'</p>
<p>If you want to report a bug, please save this page and attach it to your bug report.</p>
<ul class="buttons">
<li><a href="javascript:toggleDebugInfo()">Show debugging information</a>
</li>
<li><a href="http://moinmo.in/MoinMoinBugs">Report bug</a>
</li>
<li><a href="http://moinmo.in/FrontPage">Visit MoinMoin wiki</a>
</li>
</ul>
<div id="debug-info">
<script type="text/javascript">toggleDebugInfo()</script>
<div class="traceback"><h2>Traceback</h2>
<p>A problem occurred in a Python script.  Here is the
        sequence of function calls leading up to the error, in the
        order they occurred.</p>
<ol class="frames">
<li><p class="call"><a href="file:///usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/request/__init__.py">/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/request/__init__.py</a>
 in <strong>run</strong>
(self=<MoinMoin.request.request_cgi.Request object>)</p>
<ol class="context">
<li> 1281                          self.page.send_page(msg=msg)
</li>
<li> 1282                      else:
</li>
<li class="highlight"> 1283                          handler(self.page.page_name, self)
</li>
<li> 1284  
</li>
<li> 1285              # every action that didn't use to raise MoinMoinNoFooter must call this now:
</li>

</ol>
<ul class="variables">
<li><strong>handler</strong>
 = <function execute></li>
<li><strong>self</strong>
 = <MoinMoin.request.request_cgi.Request object></li>
<li>self.<strong>page</strong>
 = <MoinMoin.Page.Page object></li>
<li>self.page.<strong>page_name</strong>
 = u'TestWikiHomePage'</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/test.py">/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/test.py</a>
 in <strong>execute</strong>
(pagename=u'TestWikiHomePage', request=<MoinMoin.request.request_cgi.Request object>)</p>
<ol class="context">
<li>  118  
</li>
<li>  119  def execute(pagename, request):
</li>
<li>  120      """ Glue code for actions """
</li>
<li class="highlight">  121      test(pagename, request).render()
</li>
<li>  122  
</li>

</ol>
<ul class="variables">
<li><em>global</em>
 <strong>test</strong>
 = <class MoinMoin.action.test.test></li>
<li><strong>pagename</strong>
 = u'TestWikiHomePage'</li>
<li><strong>request</strong>
 = <MoinMoin.request.request_cgi.Request object></li>
<li>).render <em>undefined</em>
</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/__init__.py">/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/__init__.py</a>
 in <strong>render</strong>
(self=<MoinMoin.action.test.test instance>)</p>
<ol class="context">
<li>  188          elif self.form_trigger in form: # user hit the trigger button
</li>
<li>  189              if self.ticket_ok():
</li>
<li class="highlight">  190                  success, self.error = self.do_action()
</li>
<li>  191              else:
</li>
<li>  192                  success = False
</li>

</ol>
<ul class="variables">
<li>success <em>undefined</em>
</li>
<li><strong>self</strong>
 = <MoinMoin.action.test.test instance></li>
<li>self.<strong>error</strong>
 = ''</li>
<li>self.<strong>do_action</strong>
 = <bound method test.do_action of <MoinMoin.action.test.test instance>></li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/test.py">/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/test.py</a>
 in <strong>do_action</strong>
(self=<MoinMoin.action.test.test instance>)</p>
<ol class="context">
<li>  110          request.emit_http_headers(["Content-type: text/plain; charset=%s" % config.charset])
</li>
<li>  111          request.write('MoinMoin Diagnosis\n======================\n\n')
</li>
<li class="highlight">  112          runTest(request)
</li>
<li>  113          return True, ""
</li>
<li>  114  
</li>

</ol>
<ul class="variables">
<li><em>global</em>
 <strong>runTest</strong>
 = <function runTest></li>
<li><strong>request</strong>
 = <MoinMoin.request.request_cgi.Request object></li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/test.py">/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/test.py</a>
 in <strong>runTest</strong>
(request=<MoinMoin.request.request_cgi.Request object>)</p>
<ol class="context">
<li>   98              request.write("    *** The unit tests are not available ***")
</li>
<li>   99          else:
</li>
<li class="highlight">  100              _tests.run(request)
</li>
<li>  101  
</li>
<li>  102  class test(ActionBase):
</li>

</ol>
<ul class="variables">
<li><strong>_tests</strong>
 = <module 'MoinMoin._tests' from '/usr/local/wiki/...n2.4/site-packages/MoinMoin/_tests/__init__.pyc'></li>
<li>_tests.run <em>undefined</em>
</li>
<li><strong>request</strong>
 = <MoinMoin.request.request_cgi.Request object></li>
</ul>
</li>
</ol>
<div class="exception"><h3>AttributeError</h3>
<p>'module' object has no attribute 'run'</p>
<ul>
<li>args = ("'module' object has no attribute 'run'",)</li>
</ul>
</div>
</div>
<h2>System Details</h2>
<ul class="system">
<li>Date: Sun, 27 Jan 2008 21:08:18 +0000</li>
<li>Platform: Linux basement00 2.6.18-53.1.6.el5 #1 SMP Wed Jan 16 03:56:15 EST 2008 x86_64</li>
<li>Python: Python 2.4.3 (/usr/bin/python)</li>
<li>MoinMoin: Release 1.6.0 (release)</li>
</ul>
</div>

    
<!-- The above is a description of an error in a Python program,
     formatted for a Web browser. In case you are not reading this 
     in a Web browser, here is the original traceback:

Traceback (most recent call last):
  File "/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/request/__init__.py", line 1283, in run
    handler(self.page.page_name, self)
  File "/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/test.py", line 121, in execute
    test(pagename, request).render()
  File "/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/__init__.py", line 190, in render
    success, self.error = self.do_action()
  File "/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/test.py", line 112, in do_action
    runTest(request)
  File "/usr/local/wiki/moin-1.6.0/lib/python2.4/site-packages/MoinMoin/action/test.py", line 100, in runTest
    _tests.run(request)
AttributeError: 'module' object has no attribute 'run'

-->

</div>






More information about the Moin-user mailing list