sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #28222
Re: [Question #254399]: unittest and pycharm debugging
Question #254399 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/254399
Status: Answered => Open
rod is still having a problem:
Hi RaiMan,
I changed my main stuff to another name ('test.py') and tried all steps you suggested me.
So, let me sum up the outcome of this analysis :
1) pycharm debugging works fine with sikuli (no unittest2)
2) pycharm can import unittest2 (extracted as described here : https://answers.launchpad.net/sikuli/+question/253906) without any problems
3) pycharm debugging works fine even when I call the suite mySuite directly (import mySuite ...)
The problem raises (only in debugging !) when I import mySuite with the
following :
unittest2.main(defaultTest='suite', exit=False, verbosity=2)
that calls the method suite() defined in my test.py
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.4.1\helpers\pydev\pydevd.py", line 1733, in <module>
debugger.run(setup['file'], None, None)
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 3.4.1\helpers\pydev\pydevd.py", line 1226, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:/POC/test.sikuli/test.py", line 37, in <module>
unittest2.main(defaultTest='suite', exit=False, verbosity=2)
File "C:\POC\unittest2\main.py", line 82, in __init__
self.module = __import__(module)
ImportError: No module named __main__
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.