File: conftest.py

package info (click to toggle)
pyvisa-sim 0.6.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 428 kB
  • sloc: python: 1,749; makefile: 129
file content (19 lines) | stat: -rw-r--r-- 355 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os

import pytest
import pyvisa


@pytest.fixture(scope="session")
def resource_manager():
    rm = pyvisa.ResourceManager("@sim")
    yield rm
    rm.close()


@pytest.fixture
def channels():
    path = os.path.join(os.path.dirname(__file__), "fixtures", "channels.yaml")
    rm = pyvisa.ResourceManager(path + "@sim")
    yield rm
    rm.close()