[IronPython] Porting from CPython: Figuring out the calling code's directory

Michael Foord fuzzyman at voidspace.org.uk
Fri Nov 7 12:21:50 CET 2008


Ori Peleg wrote:
[snip...]
>
> BTW - the use case is for building test suites: you can have a
> subpackage of tests and define __init__.py like this:
>
> def suite():
>    import testoob
>    return testoob.collecting.collect_from_files("test_*.py")
>

Why not change the API to:

   return testoob.collecting.collect_from_files("test_*.py", __file__)

Michael

> Thanks,
> orip.
>
> -- 
> Check out my blog: http://orip.org
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>   


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog





More information about the Ironpython-users mailing list