Commit 4dfbb86c authored by Federico Vaga's avatar Federico Vaga

tst: add dma() fixture for simpler and faster tests

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 80e2f825
...@@ -12,6 +12,12 @@ def spec(): ...@@ -12,6 +12,12 @@ def spec():
spec_dev = PySPEC(pytest.pci_id) spec_dev = PySPEC(pytest.pci_id)
yield spec_dev yield spec_dev
@pytest.fixture(scope="class")
def dma():
spec = PySPEC(pytest.pci_id)
with spec.dma() as spec_dma:
yield spec_dma
def pytest_addoption(parser): def pytest_addoption(parser):
parser.addoption("--pci-id", parser.addoption("--pci-id",
required=True, help="SPEC PCI Identifier") required=True, help="SPEC PCI Identifier")
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment