Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, expected_value):
_ScalarMatcher.__init__(self, _visatype.ViInt32, expected_value)
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViInt32, expected_size_or_value)
def __init__(self):
_PointerMatcher.__init__(self, _visatype.ViInt32)
def test_convert_timedelta_to_seconds_int():
test_result = convert_timedelta_to_seconds(datetime.timedelta(seconds=10), _visatype.ViInt32)
assert test_result.value == 10
assert isinstance(test_result, _visatype.ViInt32)
test_result = convert_timedelta_to_seconds(datetime.timedelta(seconds=-1), _visatype.ViInt32)
assert test_result.value == -1
assert isinstance(test_result, _visatype.ViInt32)
test_result = convert_timedelta_to_seconds(10.5, _visatype.ViInt32)
assert test_result.value == 10
assert isinstance(test_result, _visatype.ViInt32)
test_result = convert_timedelta_to_seconds(-1, _visatype.ViInt32)
assert test_result.value == -1
assert isinstance(test_result, _visatype.ViInt32)
def test_convert_timedelta_to_seconds_int():
test_result = convert_timedelta_to_seconds(datetime.timedelta(seconds=10), _visatype.ViInt32)
assert test_result.value == 10
assert isinstance(test_result, _visatype.ViInt32)
test_result = convert_timedelta_to_seconds(datetime.timedelta(seconds=-1), _visatype.ViInt32)
assert test_result.value == -1
assert isinstance(test_result, _visatype.ViInt32)
test_result = convert_timedelta_to_seconds(10.5, _visatype.ViInt32)
assert test_result.value == 10
assert isinstance(test_result, _visatype.ViInt32)
test_result = convert_timedelta_to_seconds(-1, _visatype.ViInt32)
assert test_result.value == -1
assert isinstance(test_result, _visatype.ViInt32)
def test_convert_timedelta_to_microseconds_int():
test_result = convert_timedelta_to_microseconds(datetime.timedelta(seconds=10), _visatype.ViInt32)
assert test_result.value == 10000000
assert isinstance(test_result, _visatype.ViInt32)
test_result = convert_timedelta_to_microseconds(datetime.timedelta(seconds=-1), _visatype.ViInt32)
assert test_result.value == -1000000
assert isinstance(test_result, _visatype.ViInt32)
test_result = convert_timedelta_to_microseconds(10.5, _visatype.ViInt32)
assert test_result.value == 10500000
assert isinstance(test_result, _visatype.ViInt32)
test_result = convert_timedelta_to_microseconds(-1, _visatype.ViInt32)
assert test_result.value == -1000000
assert isinstance(test_result, _visatype.ViInt32)