[blivet:rhel7/master 3/3] Remove action_test.py

Anne Mulhern amulhern at redhat.com
Tue Mar 11 11:59:06 UTC 2014


----- Original Message -----
> From: "Vratislav Podzimek" <vpodzime at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Tuesday, March 11, 2014 4:00:31 AM
> Subject: Re: [blivet:rhel7/master 3/3] Remove action_test.py
> 
> On Tue, 2014-03-04 at 14:11 -0500, mulhern wrote:
> > The compelling reason for removing it is that it corrupts subsequently run
> > unit tests with Mock values even when it is not itself run, by importing
> > storagetestcase.py. This is obvious with tests that must be run as root,
> > I don't guarantee that it happens for other tests.
> > 
> > There are alternatives, like renaming action_test.py, or making a more
> > complicated directory structure to hide it, or discovering it separately
> > from
> > all the other tests. But until it is fixed so it can be run that extra
> > ingenuity seems like overkill.
> Can't we just use some unittest.* decorator to make it not run by
> default? I'm afraid that if it disappears from the tree it will hardly
> get an attention later.
> 
> --
> Vratislav Podzimek
> 
> Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Alas, no. If the module gets imported, subsequent tests will be corrupted.
Not running is not enough.

An alternative is to dig into storagetestcase, so that it resets blivet state
to be Mock object free in its teardown method.

That's the plan now.

- mulhern


More information about the anaconda-patches mailing list