[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] unit and doc testing questions



I'm learning about doctest, and unittests. Now if I create a file, like pygame/test/rect_test.py , is there and easy way to import the project in its parent directory?

I thought "import ../mymodule" might work, ( but at least not in 2.5  ). Then I got it to work appending sys.path.

==

1) What is your advice on imports from test files? ( Do you append your sys.path, or something else? )

2) Do you have two seperate unittests ? (A) One is ran every time source files are compiled, and a second, (B) slower one is ran at a longer interval for slow tests ?

3) Other advice relating to testing ?

thanks,
--
Jake