Re: importing and nose

2012-01-19 Thread Peter Otten
Andrea Crotti wrote: > On 01/19/2012 05:36 PM, Peter Otten wrote: >> >> I don't believe you. > > Quite sure it does: > > [andrea@precision test]$ cat simple.py > import profile > from os import path > import sys > > prof_path = path.join(path.dirname(__file__), 'profiling') > sys.path.append(pr

Re: importing and nose

2012-01-19 Thread Andrea Crotti
On 01/19/2012 05:36 PM, Peter Otten wrote: I don't believe you. Quite sure it does: [andrea@precision test]$ cat simple.py import profile from os import path import sys prof_path = path.join(path.dirname(__file__), 'profiling') sys.path.append(prof_path) import x profile.run('x.f1()') [and

Re: importing and nose

2012-01-19 Thread Peter Otten
Andrea Crotti wrote: > I'm writing some code to analyse pstats statistics, and I'm trying to > have some working unit tests. > Suppose I have in the test directory another directory 'profiling', > which contains 'x.py', and 'b.py'. > > Now running the following code in a script works perfectly,

importing and nose

2012-01-19 Thread Andrea Crotti
I'm writing some code to analyse pstats statistics, and I'm trying to have some working unit tests. Suppose I have in the test directory another directory 'profiling', which contains 'x.py', and 'b.py'. Now running the following code in a script works perfectly, class TestStatParser(unittest.T