[spambayes-bugs] [ spambayes-Bugs-981970 ] tests failing

SourceForge.net noreply at sourceforge.net
Fri Jul 9 05:36:30 CEST 2004


Bugs item #981970, was opened at 2004-06-30 02:21
Message generated for change (Comment added) made by anadelonbrin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=981970&group_id=61702

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Tony Meyer (anadelonbrin)
Summary: tests failing

Initial Comment:
Assigning to Tony for initial triage since he seems to know
the most about these apps...

There are some test scripts in spambayes/test.
I tried running them just now and got this:

    * test_sb-server.py -z - when starting:

	User interface url is http://localhost:8881/
	Listener on port 8111 is proxying localhost:8110
	error: uncaptured python exception, closing channel
	<sb_server.BayesProxyListener listening :8111 at
0x11570f8>
	(exceptions.TypeError:object does not support item
assignment
	[/Users/skip/local/lib/python2.4/asyncore.py|read|69]
	[/Users/skip/local/lib/python2.4/asyncore.py|handle_read_event|358]
	[/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py|handle_accept|284]
[/Users/skip/tmp/spambayes/scripts/sb_server.py|__init__|374]
[/Users/skip/tmp/spambayes/scripts/sb_server.py|__init__|199]
[/Users/skip/tmp/spambayes/scripts/sb_server.py|__init__|145]
[/Users/skip/local/lib/python2.4/asyncore.py|create_socket|234]
[/Users/skip/local/lib/python2.4/asyncore.py|add_channel|218])


      when connecting via lynx:

	  500 Server error

	Traceback (most recent call last):

	  File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
li
	ne 461, in found_terminator
	    getattr(plugin, name)(**params)

	TypeError: onHome() got an unexpected keyword argument ''

    * test_storage.py:

	...E.
	======================================================================
	ERROR: testNoDBMAvailable (__main__.DBStorageTestCase)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "test_storage.py", line 154, in testNoDBMAvailable
	    open_storage(db_name, True)
	  File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/storage.py",
line 676, in open_storage
	    raise NoSuchClassifierError(db_type)
	NoSuchClassifierError: True

	----------------------------------------------------------------------
	Ran 5 tests in 0.210s

	FAILED (errors=1)

    * test_smtpproxy.py:

	Traceback (most recent call last):
	  File "test_smtpproxy.py", line 93, in ?
	    from sb_server import state, _recreateState
	ImportError: No module named sb_server

    * test_programs.py:

	SpamBayes POP3 Proxy Version 1.0rc1 (May 2004)
	and engine SpamBayes Engine Version 0.3 (January 2004).

	Loading database... User interface url is
http://localhost:8880/
	FSpamBayes POP3 Proxy Version 1.0rc1 (May 2004)
	and engine SpamBayes Engine Version 0.3 (January 2004).

	Loading database...
	Traceback (most recent call last):
	  File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
961, in ?
	    run()
	  File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
955, in run
	    start()
	  File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
892, in start
	    main(state.servers, state.proxyPorts,
state.uiPort, state.launchUI)
	  File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
869, in main
	    httpServer = UserInterfaceServer(uiPort)
	  File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/UserInterface.py",
line 113, in __init__
	    Dibbler.HTTPServer.__init__(self, uiPort)
	  File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
line 304, in __init__
	    (self, context), context._map)
	  File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
line 271, in __init__
	    self.bind(port)
	  File "/Users/skip/local/lib/python2.4/asyncore.py",
line 277, in bind
	    return self.socket.bind(addr)
	  File "<string>", line 1, in bind
	socket.error: (48, 'Address already in use')
	FSpamBayes POP3 Proxy Version 1.0rc1 (May 2004)
	and engine SpamBayes Engine Version 0.3 (January 2004).

	Loading database...
	Traceback (most recent call last):
	  File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
961, in ?
	    run()
	  File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
955, in run
	    start()
	  File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
892, in start
	    main(state.servers, state.proxyPorts,
state.uiPort, state.launchUI)
	  File
"/Users/skip/tmp/spambayes/scripts/sb_server.py", line
869, in main
	    httpServer = UserInterfaceServer(uiPort)
	  File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/UserInterface.py",
line 113, in __init__
	    Dibbler.HTTPServer.__init__(self, uiPort)
	  File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
line 304, in __init__
	    (self, context), context._map)
	  File
"/Users/skip/local/lib/python2.4/site-packages/spambayes/Dibbler.py",
line 271, in __init__
	    self.bind(port)
	  File "/Users/skip/local/lib/python2.4/asyncore.py",
line 277, in bind
	    return self.socket.bind(addr)
	  File "<string>", line 1, in bind
	socket.error: (48, 'Address already in use')
	F
	======================================================================
	FAIL: test_sb_server_default (__main__.TestServer)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "test_programs.py", line 166, in
test_sb_server_default
	    self._start_spawner(s)
	  File "test_programs.py", line 148, in _start_spawner
	    spawner.start()
	  File "test_programs.py", line 103, in start
	    if self.is_running() and is_any_sb_server_running():
	  File "test_programs.py", line 78, in is_running
	    "My server stopped, but global server mutex held")
	AssertionError: My server stopped, but global server
mutex held

	======================================================================
	FAIL: test_sb_server_restore (__main__.TestServer)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "test_programs.py", line 180, in
test_sb_server_restore
	    self._start_spawner(s)
	  File "test_programs.py", line 148, in _start_spawner
	    spawner.start()
	  File "test_programs.py", line 103, in start
	    if self.is_running() and is_any_sb_server_running():
	  File "test_programs.py", line 78, in is_running
	    "My server stopped, but global server mutex held")
	AssertionError: My server stopped, but global server
mutex held

	======================================================================
	FAIL: test_sb_server_ui_port (__main__.TestServer)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "test_programs.py", line 172, in
test_sb_server_ui_port
	    self._start_spawner(s)
	  File "test_programs.py", line 148, in _start_spawner
	    spawner.start()
	  File "test_programs.py", line 103, in start
	    if self.is_running() and is_any_sb_server_running():
	  File "test_programs.py", line 78, in is_running
	    "My server stopped, but global server mutex held")
	AssertionError: My server stopped, but global server
mutex held

	----------------------------------------------------------------------
	Ran 3 tests in 15.811s

	FAILED (failures=3)


----------------------------------------------------------------------

>Comment By: Tony Meyer (anadelonbrin)
Date: 2004-07-09 15:36

Message:
Logged In: YES 
user_id=552329

Fixed test_storage.

With test_sb-server.py I get this:
"""
C:\spambayes\spambayes\test>test_sb-server.py -z
Loading database...Loading state from _pop3proxy_test.pickle
pickle
_pop3proxy_test.pickle is a new pickle

Running self-test...

User interface url is http://localhost:8881/
Listener on port 8111 is proxying localhost:8110
Self-test passed.
"""

I'm using Python 2.3 - could this be a 2.3 -> 2.4 change? 
Or a platform depend problem?  (me Windows, you not)

I'll look into the other two shortly.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=981970&group_id=61702


More information about the Spambayes-bugs mailing list