>A little background... I am tring to setup an environment where I can use
>Jython with JUnit to test Java systems. I also didn't want to loose the
>ability to use pure java tests and wanted to make use of the current Ant
>tasks to run the tests and generate reports.
PyUnit, ie. unittest.py also runs well under jython, but there is only
a text interface, as the gui is not based on swing/awt. PyUnit is
derived directly from JUnit, so it might better fit your needs.
>From the first glance it looks like jythonc is exactly what I want... and
>well it sort of works, but it is very touchy about what it can do. I had
>things working, then broke it by a minor change (which didn't affect the
>running of the .py's), spent hours finding out what was wrong... then did
>the same thing all over again.
>So, I have overcome the hurdle of having a Jython class extend from
>junit.framework.TestCase, and pass its name in the constructor (for both
>compiled and interpreted use).
>The problem I am running into now, is that I moved some of the support bits
>that allow the above to work into a support.py module... well that isn't
>what actually caused the problem, the actual problem was when I tried using
>a package to better organize tests.
>What I have is something like this:
>I am setting -Dpython.path=src/py and running jythonc with arguments like:
>jythonc --deep --package my.package.pytest --workdir output/jpywork --falsenames ENABLE_SUPER_CLASS_INIT support command.executor
>Which produces output like this:
>So far so good... until I try to startup the test runner. I get a
>"ImportError: no module named support" exception when running.
You might try adding an empty file src/py/__init__.py
Get latest updates about Open Source Projects, Conferences and News.