[Eric] Help Unit testing

Cantoni Massimiliano massimiliano.cantoni at insiel.it
Mon Jun 25 08:47:29 BST 2007


Dear List users,

I am working on the new version of Eric4 on my Gentoo Linux machine.
I have already worked with Python using Eclipse PyDev but I found it
elegant but not very responsive.
I switched to Eric due to Python native implementation and QT4 features
which I like very much.
I like very much Eric features but now I am facing the following
problem:
My project directory structure is something like this:

MyProjectRoot
	src
		mypackage
			mycode.py
			__init__.py
		__init__.py
	test
		mypackage
			__init.py
			mycodetestcase.py
		__init__.py

Now if I run unittest from test/mypackage/mycodetestcase.py, it
complains it does not find a class
Defined in my src/package/mycode even if I used using
src.mypackage.mycode import myclass.

I think the reason is due to the fact UnitTest is using as working
directory test/mypackage/...
It is possible to add a working dir like MyProjectRoot to che
enviroment?

Am I doing something wrong?

Could someone point me to the right direction?

Thank you for your attention

Massimiliano Cantoni





More information about the Eric mailing list