[PATCH blivet/master 2/3] devicelibs.lvm: Add 'autobackup' attribute

Will Woods wwoods at redhat.com
Tue Sep 23 16:37:22 UTC 2014


On Mon, 2014-09-22 at 08:43 -0400, Anne Mulhern wrote:
> > +# This defines whether we want automatic metadata backup or not.
> > +# You probably want this on unless you're doing image builds.
> > +autobackup = True
> 
> Probably belongs in flags.py.

Reasonable.

> > +import glob
> > +
> 
> Would prefer this import with other Python imports, i.e., unittest import.

Also reasonable.

> > +        ##
> > +        ## check if autobackup=False worked
> > +        ##
> > +        self.assertEqual(_old_backups, self._list_backups())
> > +
> 
> This test should be in a separate method. The existing method is already
> 200 lines long and you're testing something quite specific here.

Ugh. Yes, but that entire method should be like 17 separate tests. So
should I refactor the whole thing, or just factor out my own test?
Because to do that I'm gonna end up writing extra setup and teardown
functions, and then I might as well just do the rest...

-w



More information about the anaconda-patches mailing list