From 2c874c8292f2f071e14624ee65ef554a471aa74d Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 30 Jan 2023 08:57:53 +0100 Subject: [PATCH 1/2] support qcodes 0.37 --- qcodes_contrib_drivers/tests/test_Keysight_M3201A.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qcodes_contrib_drivers/tests/test_Keysight_M3201A.py b/qcodes_contrib_drivers/tests/test_Keysight_M3201A.py index e7170938a..2c4f372ec 100644 --- a/qcodes_contrib_drivers/tests/test_Keysight_M3201A.py +++ b/qcodes_contrib_drivers/tests/test_Keysight_M3201A.py @@ -1,4 +1,8 @@ -from qcodes.instrument_drivers.test import DriverTestCase +try: + from qcodes.tests.driver_test_case import DriverTestCase +except ImportError: + # qcodes < 0.37 + from qcodes.instrument_drivers.test import DriverTestCase import unittest try: From 5fd491ad93dbd9852fb1fefb05d3ba1aa65629fc Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 30 Jan 2023 09:35:00 +0100 Subject: [PATCH 2/2] fix typecheck --- qcodes_contrib_drivers/tests/test_Keysight_M3201A.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcodes_contrib_drivers/tests/test_Keysight_M3201A.py b/qcodes_contrib_drivers/tests/test_Keysight_M3201A.py index 2c4f372ec..a42d39d6b 100644 --- a/qcodes_contrib_drivers/tests/test_Keysight_M3201A.py +++ b/qcodes_contrib_drivers/tests/test_Keysight_M3201A.py @@ -2,7 +2,7 @@ from qcodes.tests.driver_test_case import DriverTestCase except ImportError: # qcodes < 0.37 - from qcodes.instrument_drivers.test import DriverTestCase + from qcodes.instrument_drivers.test import DriverTestCase # type: ignore[import,no-redef] import unittest try: