Title: test___all__ fails at modjy
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: amak Nosy List: amak, jeff.allen, zyasoft
Priority: Keywords: test failure causes

Created on 2015-04-06.18:56:27 by jeff.allen, last changed 2015-05-09.08:49:31 by jeff.allen.

msg9765 (view) Author: Jeff Allen (jeff.allen) Date: 2015-04-06.18:56:27
Observed on Windows 7 in Jython 2.7rc2:


FAIL: test_all (__main__.AllTest)
Traceback (most recent call last):
  File "C:\jython\2.7rc2\Lib\test\", line 107, in test_all
  File "C:\jython\2.7rc2\Lib\test\", line 107, in test_all
  File "C:\jython\2.7rc2\Lib\test\", line 42, in check_all"__all__ failure in {}: {}: {}".format(
AssertionError: __all__ failure in modjy: ImportError: cannot import name ServletException


> jython
Jython 2.7rc2 (default:913eec7f2e60, Apr 3 2015, 17:13:45)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_60
Type "help", "copyright", "credits" or "license" for more information.
>>> from modjy import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\jython\2.7rc2\Lib\modjy\", line 30, in <module>
    from modjy_exceptions import *
  File "C:\jython\2.7rc2\Lib\modjy\", line 27, in <module>
    from javax.servlet import ServletException
ImportError: cannot import name ServletException
>>> import javax.servlet
>>> dir(javax.servlet)
['__name__', 'http']

It looks like maybe a missing JAR, however, the class is in servlet-api-2.5.jar, which is present, but I can't find a corresponding .pkc cache anywhere related.
msg10041 (view) Author: Jim Baker (zyasoft) Date: 2015-05-09.04:20:21
We don't embed the servlet jar, only link against it during builds: see these notes in the setup of the HelloWSGI example

It's not normally seen during testing of course, say with ant regrtest.

This issue can be closed out, since it's just a matter of ensuring there is some implementation of a servlet jar that's on the CLASSPATH.
msg10042 (view) Author: Jeff Allen (jeff.allen) Date: 2015-05-09.08:49:31
Ok, I see how our development and test environment diverges from the users'.

Clean test runs being a prerequisite for automated testing, I wonder if we should either declare this as expected to fail in regrtest, or use the blacklist in test___all__ to skip modjy. The second is better, I think, except that we sprout a Jython-specific test___all__.
Date User Action Args
2015-05-09 08:49:31jeff.allensetmessages: + msg10042
2015-05-09 04:20:22zyasoftsetstatus: open -> closed
resolution: invalid
messages: + msg10041
nosy: + zyasoft
2015-05-08 16:24:30amaksetassignee: amak
nosy: + amak
2015-04-06 18:56:28jeff.allencreate