Skip to content

Commit cc841f6

Browse files
committed
Update tests to reflect changes
1 parent 528b60f commit cc841f6

5 files changed

Lines changed: 15 additions & 13 deletions

File tree

tests/drivers/test_lakeshore_335.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from qcodes.instrument import InstrumentBase
55
from qcodes.instrument_drivers.Lakeshore import LakeshoreModel335
66

7-
from .test_lakeshore import (
7+
from .test_lakeshore_372 import (
88
DictClass,
99
MockVisaInstrument,
1010
command,

tests/drivers/test_lakeshore_336.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from qcodes.instrument import InstrumentBase
55
from qcodes.instrument_drivers.Lakeshore import LakeshoreModel336
66

7-
from .test_lakeshore import (
7+
from .test_lakeshore_372 import (
88
DictClass,
99
MockVisaInstrument,
1010
command,

tests/drivers/test_lakeshore_336_legacy.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
import time
33

44
from qcodes.instrument import InstrumentBase
5-
from qcodes.instrument_drivers.Lakeshore.Model_336 import Model_336
5+
from qcodes.instrument_drivers.Lakeshore.Model_336 import (
6+
Model_336, # pyright: ignore[reportDeprecated]
7+
)
68

7-
from .test_lakeshore import (
9+
from .test_lakeshore_372 import (
810
DictClass,
911
MockVisaInstrument,
1012
command,
@@ -18,7 +20,7 @@
1820
VISA_LOGGER = ".".join((InstrumentBase.__module__, "com", "visa"))
1921

2022

21-
class Model_336_Mock(MockVisaInstrument, Model_336):
23+
class Model_336_Mock(MockVisaInstrument, Model_336): # pyright: ignore[reportDeprecated]
2224
def __init__(self, *args, **kwargs) -> None:
2325
super().__init__(*args, **kwargs)
2426

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
from typing_extensions import ParamSpec
1212

1313
from qcodes.instrument import InstrumentBase
14+
from qcodes.instrument_drivers.Lakeshore import LakeshoreModel372
1415
from qcodes.instrument_drivers.Lakeshore.lakeshore_base import (
1516
LakeshoreBaseSensorChannel,
1617
)
17-
from qcodes.instrument_drivers.Lakeshore.Model_372 import Model_372
1818
from qcodes.logger import get_instrument_logger
1919
from qcodes.utils import QCoDeSDeprecationWarning
2020

@@ -138,7 +138,7 @@ def __setattr__(self, name: str, value: Any) -> None:
138138
self._attrs[name] = value
139139

140140

141-
class Model_372_Mock(MockVisaInstrument, Model_372):
141+
class LakeshoreModel372Mock(MockVisaInstrument, LakeshoreModel372):
142142
def __init__(self, *args, **kwargs) -> None:
143143
super().__init__(*args, **kwargs)
144144

@@ -365,7 +365,7 @@ def wrapped_fixture():
365365

366366
@instrument_fixture(scope="function")
367367
def lakeshore_372():
368-
return Model_372_Mock(
368+
return LakeshoreModel372Mock(
369369
"lakeshore_372_fixture",
370370
"GPIB::3::INSTR",
371371
pyvisa_sim_file="lakeshore_model372.yaml",

tests/test_logger.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from qcodes.instrument_drivers.american_magnetics import AMIModel430, AMIModel4303D
1818
from qcodes.instrument_drivers.tektronix import TektronixAWG5208
1919
from qcodes.logger.log_analysis import capture_dataframe
20-
from tests.drivers.test_lakeshore import Model_372_Mock
20+
from tests.drivers.test_lakeshore_372 import LakeshoreModel372Mock
2121

2222
if TYPE_CHECKING:
2323
from collections.abc import Callable, Generator
@@ -58,8 +58,8 @@ def awg5208(caplog: LogCaptureFixture) -> "Generator[TektronixAWG5208, None, Non
5858

5959

6060
@pytest.fixture
61-
def model372() -> "Generator[Model_372_Mock, None, None]":
62-
inst = Model_372_Mock(
61+
def model372() -> "Generator[LakeshoreModel372Mock, None, None]":
62+
inst = LakeshoreModel372Mock(
6363
"lakeshore_372",
6464
"GPIB::3::INSTR",
6565
pyvisa_sim_file="lakeshore_model372.yaml",
@@ -231,7 +231,7 @@ def test_capture_dataframe() -> None:
231231
assert df.message[0] == TEST_LOG_MESSAGE
232232

233233

234-
def test_channels(model372: Model_372_Mock) -> None:
234+
def test_channels(model372: LakeshoreModel372Mock) -> None:
235235
"""
236236
Test that messages logged in a channel are propagated to the
237237
main instrument.
@@ -265,7 +265,7 @@ def test_channels(model372: Model_372_Mock) -> None:
265265
assert f == u
266266

267267

268-
def test_channels_nomessages(model372: Model_372_Mock) -> None:
268+
def test_channels_nomessages(model372: LakeshoreModel372Mock) -> None:
269269
"""
270270
Test that messages logged in a channel are not propagated to
271271
any instrument.

0 commit comments

Comments
 (0)