python - How to find out the location of a doctest file when running nose? -


i using python nose run bunch of doctests in subdirectories. calling script nose.cmd:

nosetests --with-doctest --doctest-extension=rst 

(the doctests live in *.rst files.)

example directory structure:

\nose.cmd \__init__.py \module1\__init__.py \module1\mymod.py \module1\mymod.rst \module2\... \module3\... 

how can path of rst file retrieved in python code inside rst file itself? example in mymod.rst usual sys.path , __file__ give no information path \module1\ need imports.

of course introduce constant each rst file contains directory, that's not prefer.

because not find way decided run tests without nose.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -