MCPcopy Create free account
hub / github.com/ccxt/ccxt / assert_less_or_equal

Function assert_less_or_equal

python/ccxt/test/exchange/base/test_shared_methods.py:244–251  ·  view source on GitHub ↗
(exchange, skipped_properties, method, entry, key, compare_to, allow_null=True)

Source from the content-addressed store, hash-verified

242
243
244def assert_less_or_equal(exchange, skipped_properties, method, entry, key, compare_to, allow_null=True):
245 if key in skipped_properties:
246 return
247 log_text = log_template(exchange, method, entry)
248 value = exchange.safe_string(entry, key)
249 assert value is not None or allow_null, 'value is null' + log_text
250 if value is not None and compare_to is not None:
251 assert Precise.string_le(value, compare_to), string_value(key) + ' key (with a value of ' + string_value(value) + ') was expected to be <= ' + string_value(compare_to) + log_text
252
253
254def assert_equal(exchange, skipped_properties, method, entry, key, compare_to, allow_null=True):

Callers 1

check_precision_accuracyFunction · 0.85

Calls 4

log_templateFunction · 0.85
string_valueFunction · 0.85
safe_stringMethod · 0.80
string_leMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…