Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
jenshnielsen committed Jun 10, 2020
1 parent 439bb7c commit 2bac085
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions qcodes/tests/parameter/test_snapshot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Union, Optional, Callable
from typing import Union, Optional, Callable, Dict, Any
from datetime import datetime, timedelta

from qcodes.instrument.parameter import Parameter
@@ -10,10 +10,10 @@ def create_parameter(snapshot_get: bool,
cache_is_valid: bool,
get_cmd: Optional[Union[Callable, bool]],
offset: Union[str, float] = NOT_PASSED):
kwargs = dict(set_cmd=None,
label='Parameter',
unit='a.u.',
docstring='some docs')
kwargs: Dict[str, Any] = dict(set_cmd=None,
label='Parameter',
unit='a.u.',
docstring='some docs')

if offset != NOT_PASSED:
kwargs.update(offset=offset)
@@ -43,7 +43,7 @@ def wrapped_func(*args, **kwargs):
return wrapped_func

p.get = wrap_in_call_counter(p.get)
assert p.get.call_count() == 0 # pre-condition
assert p.get.call_count() == 0 # type: ignore[attr-defined] # pre-condition
else:
assert not hasattr(p, 'get') # pre-condition
assert not p.gettable

0 comments on commit 2bac085

Please sign in to comment.