[PATCH 2/3] Add some tests that verify the results of DeviceTree.populate.
Brian C. Lane
bcl at redhat.com
Tue May 6 17:19:05 UTC 2014
On Mon, May 05, 2014 at 06:58:50PM -0500, David Lehman wrote:
> >>+ _match_attrs = ["name", "type"]
> >>+ """ List of attributes that must match to identify a device. """
> >>+
> >>+ def collect_expected_data(self):
> >>+ """ Collect the attribute data we plan to validate later. """
> >>+ # only look at devices on the disk images -- no loops, &c
> >>+ for device in (d for d in self.blivet.devices
> >>+ if d.disks and
> >>+
> >>set(d.disks).issubset(set(self.blivet.disks))):
> >
> >Where you use issubset() it might be prettier to use <= operator.
>
> I'm not very comfortable with using those operators for sets. Is the
> meaning clear to everyone but me?
Not just you, I have to look them up when I encounter them. I'm not a
fan of overloading the math operators.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list