1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-25 21:57:45 +03:00

lvmdbustest.py: Add nested helper function major_minor

This commit is contained in:
Tony Asleson 2019-10-09 11:48:00 -05:00
parent e1d3a6c552
commit c786636afb

View File

@ -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()