コード例 #1
0
 def test_loop_devices_are_included(self, tmpfile):
     path = os.path.dirname(tmpfile(name='loop0', contents=''))
     result = disk.get_block_devs(sys_block_path=path, skip_loop=False)
     assert len(result) == 1
     assert result == ['loop0']
コード例 #2
0
ファイル: test_disk.py プロジェクト: ShiqiCooperation/ceph
 def test_loop_devices_are_included(self, tmpfile):
     path = os.path.dirname(tmpfile(name='loop0', contents=''))
     result = disk.get_block_devs(sys_block_path=path, skip_loop=False)
     assert len(result) == 1
     assert result == ['loop0']
コード例 #3
0
 def test_loop_devices_are_missing(self, tmpfile):
     path = os.path.dirname(tmpfile(name='loop0', contents=''))
     result = disk.get_block_devs(sys_block_path=path)
     assert result == []
コード例 #4
0
ファイル: test_disk.py プロジェクト: ShiqiCooperation/ceph
 def test_loop_devices_are_missing(self, tmpfile):
     path = os.path.dirname(tmpfile(name='loop0', contents=''))
     result = disk.get_block_devs(sys_block_path=path)
     assert result == []