unittest: new reporting category "skipped"
Remy Blank
remy.blank_asps at pobox.com
Thu Sep 23 11:11:32 EDT 2004
Roy Smith wrote:
> Having just completed a project which required testing as root, I can
> sympathize with you completely! If at all possible, try to avoid
> getting painted into that particular corner.
>
> Is it possible that by building the appropriate test scaffolding, you
> could run the tests as a normal user? For example, let's say the reason
> you need to be root is because you are reading a file which is mode 600.
> You could then do something like this:
(snip)
> It's not always possible or practical to do that, but it's worth
> thinking about.
Yes, well, the whole idea of my project (which I'll call mockfs) is
to provide a framework to do exactly that. However, for it to be
useful, it has to behave as closely as possible as an original
filesystem. So the idea was to write a test suite that can be run
either on the real filesystem (in a chroot environment), or on the
mock filesystem. Both should pass identically. And for running it on
the real filesystem, well, you need to be root for some tests.
-- Remy
Remove underscore and suffix in reply address for a timely response.
More information about the Python-list
mailing list