> @ExceptionCatcher()
> def run_once(self, *args, **kwargs):
> # This is not so good. We need to get the directory containing framework/
> # into the PYTHONPATH for the next import to work, but we don't know
> # which directory that'll be without crazy digging or install-time
> # manipulation. I prefer the digging.
> f = sys.modules[self.__class__.__module__].__file__
> sys.path.append(os.path.dirname(f))
> from framework import StorageTestFramework
The test directory (containing framework/ subdir) is stored as self.bindir
variable. That should be necessary to put it into PYTHONPATH. Also, a
forthcoming patch will ensure that the test has CWD set to self.bindir
(therefore local directory imports should work out of the box). Does it solve
your problem or did I misunderstand it?
I'll need to test, but this would be way cleaner if so.
Apart from this, everything looks great (at least at my end). We can
merge it
when you feel it's ready.
Great!
- Chris