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

Function assert_less

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

Source from the content-addressed store, hash-verified

232
233
234def assert_less(exchange, skipped_properties, method, entry, key, compare_to, allow_null=True):
235 if key in skipped_properties:
236 return
237 log_text = log_template(exchange, method, entry)
238 value = exchange.safe_string(entry, key)
239 assert value is not None or allow_null, 'value is null' + log_text
240 if value is not None and compare_to is not None:
241 assert Precise.string_lt(value, compare_to), string_value(key) + ' key (with a value of ' + string_value(value) + ') was expected to be < ' + string_value(compare_to) + log_text
242
243
244def assert_less_or_equal(exchange, skipped_properties, method, entry, key, compare_to, allow_null=True):

Callers

nothing calls this directly

Calls 4

log_templateFunction · 0.85
string_valueFunction · 0.85
safe_stringMethod · 0.80
string_ltMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…