Repository: pymeasure/pymeasure (language: python)

Issue:
expected_protocol uses empty dictionary as default value
`expected_protocol` uses an empty dictionary as a default value, which is bad practice.
The underlying `ProtocolAdapter` already accepts `None`, so a change to `None` is a no brainer.


Discussion / hints:

Fix patch:
diff --git a/pymeasure/instruments/agilent/agilentB1500.py b/pymeasure/instruments/agilent/agilentB1500.py
index 8afff56c3e..35af9b642a 100644
--- a/pymeasure/instruments/agilent/agilentB1500.py
+++ b/pymeasure/instruments/agilent/agilentB1500.py
@@ -277,7 +277,7 @@ class _data_formatting_generic():
         smu_status = {
             1: 'A/D converter overflowed.',
             2: 'Oscillation of force or saturation current.',
-            4: 'Antoher unit reached its compliance setting.',
+            4: 'Another unit reached its compliance setting.',
             8: 'This unit reached its compliance setting.',
             16: 'Target value was not found within the search range.',
             32: 'Search measurement was automatically stopped.',
diff --git a/pymeasure/instruments/hcp/tc038.py b/pymeasure/instruments/hcp/tc038.py
index 13773ac918..4d6958b30d 100644
--- a/pymeasure/instruments/hcp/tc038.py
+++ b/pymeasure/instruments/hcp/tc038.py
@@ -161,6 +161,6 @@ def set_monitored_quantity(self, quantity='temperature'):
 
     information = Instrument.measurement(
         "INF6",
-        """Get the information about the device and its capabilites.""",
+        """Get the information about the device and its capabilities.""",
         get_process=lambda got: got[7:-1],
     )


Test patch:
diff --git a/pymeasure/test.py b/pymeasure/test.py
index 5b5df68c58..0ab639b88c 100644
--- a/pymeasure/test.py
+++ b/pymeasure/test.py
@@ -29,7 +29,7 @@
 
 @contextmanager
 def expected_protocol(instrument_cls, comm_pairs,
-                      connection_attributes={}, connection_methods={},
+                      connection_attributes=None, connection_methods=None,
                       **kwargs):
     """Context manager that checks sent/received instrument commands without a
     device connected.