Great idea Michael, thanks! A small price to pay to make it work with
IronPython.
I'll probably make it optional (affect only IronPython users).
On Nov 7, 1:21 pm, Michael Foord <[EMAIL PROTECTED]> wrote:
> Why not change the API to:
>
> return testoob.collecting.collect_from_files("test_*.py",
.
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ori Peleg
> Sent: Thursday, November 06, 2008 2:27 PM
> To: [EMAIL PROTECTED]
> Subject: [IronPython] Porting from CPython: Figuring out the calling code's
> directory
>
> Hi,
>
> I'm portin
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.
name
comparison heuristic or private reflection or something to bring it all
together).
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ori Peleg
Sent: Thursday, November 06, 2008 2:27 PM
To: users@lists.ironpython.com
Subject: [IronPython] Porting from CPython: Figuring out the
Hi,
I'm porting Testoob to IronPython and have a module function that needs to
know the filename where the code calling it is defined.
In CPython I get the current frame with sys._getframe(), then climb
the stack with frame.f_back until I find a different file:
def _first_external_frame():
im