diff options
author | Tony Asleson <tasleson@redhat.com> | 2019-10-09 11:48:00 -0500 |
---|---|---|
committer | Tony Asleson <tasleson@redhat.com> | 2019-10-30 10:38:40 -0500 |
commit | c786636afba068fc0f560b6dd1dd9dd532c35135 (patch) | |
tree | cc544a64bd1a1f1c8101d41400677c2422cf4c43 | |
parent | e1d3a6c552e8d23837c17934a83c3925cd40252d (diff) | |
download | lvm2-c786636afba068fc0f560b6dd1dd9dd532c35135.tar.gz |
lvmdbustest.py: Add nested helper function major_minor
-rwxr-xr-x | test/dbus/lvmdbustest.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py index a9d7fac74..0b7140a89 100755 --- a/test/dbus/lvmdbustest.py +++ b/test/dbus/lvmdbustest.py @@ -1316,6 +1316,10 @@ class TestDbusService(unittest.TestCase): EOD)) def test_pv_scan(self): + + def major_minor(d): + return (int(d.properties['MAJOR']), int(d.properties['MINOR'])) + devices = TestDbusService._get_devices() self.assertEqual(self._pv_scan(False, True, [], []), '/') @@ -1327,8 +1331,7 @@ class TestDbusService(unittest.TestCase): self.assertEqual(self._pv_scan(False, True, block_path, []), '/') self._check_consistency() - mm = [(int(d.properties['MAJOR']), int(d.properties['MINOR'])) - for d in devices] + mm = [major_minor(d) for d in devices] self.assertEqual(self._pv_scan(False, True, block_path, mm), '/') self._check_consistency() |