Issue774219
Created on 2003-07-19.14:56:16 by janeaustine50, last changed 2006-08-31.03:52:34 by cgroves.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2003-07-19 14:56:16 | janeaustine50 | create | |
Created on 2003-07-19.14:56:16 by janeaustine50, last changed 2006-08-31.03:52:34 by cgroves.
| Messages | |||
|---|---|---|---|
| msg859 (view) | Author: Jane Austine (janeaustine50) | Date: 2003-07-19.14:56:16 | |
Jython 2.1 final on win XP.
Jython 2.1 on java1.4.2-beta (JIT: null)
Type "copyright", "credits" or "license" for more
information.
>>> import sys
>>> sys.path.append('junit.jar')
>>> import junit
>>> junit.framework
<java package junit.framework at 13554088>
>>> junit.framework.TestCase
Traceback (innermost last):
File "<console>", line 1, in ?
AttributeError: java package 'junit.framework' has no
attribute 'TestCase'
>>> from junit.framework import *
>>> junit.framework.TestCase
<jclass junit.framework.TestCase at 22498184>
>>>
As you see the junit.framework.TestCase is not
accessible simply by adding the jar file in the sys.path.
You need to import the specific class in order to access
it.
|
|||
| msg860 (view) | Author: Jane Austine (janeaustine50) | Date: 2003-07-24.09:11:36 | |
Logged In: YES user_id=732903 Even if "TestCase" class seems to be accessible from the work-around, you can't instantiate an instace from that class; it results in a null pointer exception. |
|||
| msg861 (view) | Author: Charlie Groves (cgroves) | Date: 2006-08-31.03:52:34 | |
Logged In: YES user_id=1174327 Fixed in trunk. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2003-07-19 14:56:16 | janeaustine50 | create | |
Supported by Python Software Foundation,
Powered by Roundup