Hi and thanks in advance,
I am trying to use python javabridge to to do a unit test that requires me to use a java jar file that has some api classes that I am trying to use. FYI, jar file is in the same directory as the test. ERROR:
# nosetests --with-javabridge --with-xunit --xunit-file=test.xml jbTest.py
E
======================================================================
ERROR: Failure: ImportError (No module named com.filenet.api.core)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/root/test/jbTest.py", line 6, in <module>
from com.filenet.api.core import Factory
ImportError: No module named com.filenet.api.core
-------------------- >> begin captured logging << --------------------
javabridge.jutil: DEBUG: Creating JVM object
javabridge.jutil: DEBUG: Signalling caller
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 1 test in 0.002s
FAILED (errors=1)
code:
import unittest
import os
import javabridge
javabridge.start_vm(run_headless=True)
javabridge.JARS.append("Jace.jar")
from com.filenet.api.core import Factory
class testCE(unittest.TestCase):
def test_CE(self):
pass
Aucun commentaire:
Enregistrer un commentaire