Question #664253 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/664253

sam  posted a new comment:
RaiMan,

Thank you very much. I took a look around to see if pytest is compatible
with Jython. It seems Pytest does not support Jython 2.5.3 and 2.7.  I
put some links below:

https://stackoverflow.com/questions/13250258/using-pytest-with-jython

https://github.com/pytest-dev/pytest/issues/3111

Therefore, I tried to import unittest and XMLTestrunner instead of
pytest. Some part of the code is shown below:

import unittest
from XMLTestRunner1 import *

suite = unittest.TestLoader().loadTestsFromTestCase(FlowCode_test)

result = XMLTestRunner(file("unittest.xml", "w")).run(suite)
print(result)

However, I got this error message when I run the GUI:

Error caused by: Traceback (most recent call last): 
result = XMLTestRunner(file("unittest.xml", "w")).run(suite) File 
"C:\sikulix\sikulixapi.jar\Lib\XMLTestRunner1.py", line 191, in run File 
"C:\sikulix\sikulix.jar\Lib\unittest\suite.py", line 70, in __call__ File 
"C:\sikulix\sikulix.jar\Lib\unittest\suite.py", line 99, in run File 
"C:\sikulix\sikulix.jar\Lib\unittest\suite.py", line 178, in 
_handleModuleFixture TypeError: coercing to Unicode: need string, NoneType type 
found

Interestingly, whenever I run the script on the command line using "java
-cp %JYTHON_HOME%jython.jar;%CLASSPATH% org.python.util.jython" command
everything looks fine and Sikuli runs.

Is there something that I am doing wrong?

Thank you

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to