importing and nose
andrea.crotti.0 at gmail.com
Thu Jan 19 12:11:11 EST 2012
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,
self.temp_file = tempfile.mktemp()
prof_path = path.join(path.dirname(__file__), 'profiling')
But running it within nose I get the following
exec cmd in globals, locals
File "<string>", line 1, in <module>
NameError: name 'x' is not defined
Which doesn't make sense to me, because the import doesn't actually
how can x not be defined???
More information about the Python-list