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):
_PointerMatcher.__init__(self, _visatype.ViReal64)
def __init__(self, expected_size_or_value):
_BufferMatcher.__init__(self, _visatype.ViReal64, expected_size_or_value)
def __init__(self, expected_value):
_ScalarMatcher.__init__(self, _visatype.ViReal64, expected_value)
def test_convert_timedelta_to_microseconds_double():
test_result = convert_timedelta_to_microseconds(datetime.timedelta(seconds=10), _visatype.ViReal64)
assert test_result.value == 10000000.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_microseconds(datetime.timedelta(seconds=-1), _visatype.ViReal64)
assert test_result.value == -1000000.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_microseconds(10.5, _visatype.ViReal64)
assert test_result.value == 10500000.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_microseconds(-1, _visatype.ViReal64)
assert test_result.value == -1000000.0
assert isinstance(test_result, _visatype.ViReal64)
def test_convert_timedelta_to_seconds_double():
test_result = convert_timedelta_to_seconds(datetime.timedelta(seconds=10), _visatype.ViReal64)
assert test_result.value == 10.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_seconds(datetime.timedelta(seconds=-1), _visatype.ViReal64)
assert test_result.value == -1
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_seconds(10.5, _visatype.ViReal64)
assert test_result.value == 10.5
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_seconds(-1, _visatype.ViReal64)
assert test_result.value == -1
assert isinstance(test_result, _visatype.ViReal64)
def test_convert_timedelta_to_milliseconds_double():
test_result = convert_timedelta_to_milliseconds(datetime.timedelta(seconds=10), _visatype.ViReal64)
assert test_result.value == 10000.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_milliseconds(datetime.timedelta(seconds=-1), _visatype.ViReal64)
assert test_result.value == -1000.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_milliseconds(10.5, _visatype.ViReal64)
assert test_result.value == 10500.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_milliseconds(-1, _visatype.ViReal64)
assert test_result.value == -1000.0
assert isinstance(test_result, _visatype.ViReal64)
def test_convert_timedelta_to_microseconds_double():
test_result = convert_timedelta_to_microseconds(datetime.timedelta(seconds=10), _visatype.ViReal64)
assert test_result.value == 10000000.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_microseconds(datetime.timedelta(seconds=-1), _visatype.ViReal64)
assert test_result.value == -1000000.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_microseconds(10.5, _visatype.ViReal64)
assert test_result.value == 10500000.0
assert isinstance(test_result, _visatype.ViReal64)
test_result = convert_timedelta_to_microseconds(-1, _visatype.ViReal64)
assert test_result.value == -1000000.0
assert isinstance(test_result, _visatype.ViReal64)