Fix code formatting - tox -e fmt
This commit is contained in:
@@ -6,24 +6,25 @@
|
||||
import pytest
|
||||
|
||||
from openvixdisklib import nfc_open
|
||||
from tests.integration.base import LabEnv, SECTOR_SIZE, pattern_bytes
|
||||
from tests.integration.base import SECTOR_SIZE, LabEnv, pattern_bytes
|
||||
|
||||
|
||||
class TestNfcOpen:
|
||||
@pytest.mark.parametrize(
|
||||
"nfc_ssl", [True, False], ids=["nbdssl", "nbd"])
|
||||
@pytest.mark.parametrize("nfc_ssl", [True, False], ids=["nbdssl", "nbd"])
|
||||
@pytest.mark.parametrize(
|
||||
"compression",
|
||||
[nfc_open.NFC_COMPRESSION_NONE, nfc_open.NFC_COMPRESSION_FASTLZ],
|
||||
ids=["plain", "fastlz"])
|
||||
ids=["plain", "fastlz"],
|
||||
)
|
||||
def test_open_disk_and_read_first_sector(
|
||||
self, lab: LabEnv, nfc_ssl: bool, compression: int) -> None:
|
||||
self, lab: LabEnv, nfc_ssl: bool, compression: int
|
||||
) -> None:
|
||||
"""Open the temp VMDK, write sector 0, and read it back."""
|
||||
expected = pattern_bytes(SECTOR_SIZE, b"NFC-OPEN-S0")
|
||||
with lab.authenticate(read_only=False, nfc_ssl=nfc_ssl) as session:
|
||||
with nfc_open.open_disk(
|
||||
session, lab.disk_path, read_only=False,
|
||||
compression=compression) as disk:
|
||||
session, lab.disk_path, read_only=False, compression=compression
|
||||
) as disk:
|
||||
assert disk.path == lab.disk_path
|
||||
assert disk.handle > 0
|
||||
assert disk.sector_size == SECTOR_SIZE
|
||||
|
||||
Reference in New Issue
Block a user