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

Method run_tests

python/ccxt/test/tests_sync.py:397–420  ·  view source on GitHub ↗
(self, exchange, tests, is_public_test)

Source from the content-addressed store, hash-verified

395 return True
396
397 def run_tests(self, exchange, tests, is_public_test):
398 test_names = list(tests.keys())
399 promises = []
400 for i in range(0, len(test_names)):
401 test_name = test_names[i]
402 test_args = tests[test_name]
403 promises.append(self.test_safe(test_name, exchange, test_args, is_public_test))
404 # todo - not yet ready in other langs too
405 # promises.push (testThrottle ());
406 results = (promises)
407 # now count which test-methods retuned `false` from "testSafe" and dump that info below
408 failed_methods = []
409 for i in range(0, len(test_names)):
410 test_name = test_names[i]
411 test_returned_value = results[i]
412 if not test_returned_value:
413 failed_methods.append(test_name)
414 test_prefix_string = 'PUBLIC_TESTS' if is_public_test else 'PRIVATE_TESTS'
415 if len(failed_methods):
416 errors_string = ', '.join(failed_methods)
417 dump('[TEST_FAILURE]', exchange.id, test_prefix_string, 'Failed methods : ' + errors_string)
418 if self.info:
419 dump(self.add_padding('[INFO] END ' + test_prefix_string + ' ' + exchange.id, 25))
420 return True
421
422 def load_exchange(self, exchange):
423 result = self.test_safe('loadMarkets', exchange, [], True)

Callers 2

run_public_testsMethod · 0.95
run_private_testsMethod · 0.95

Calls 5

test_safeMethod · 0.95
add_paddingMethod · 0.95
dumpFunction · 0.90
rangeFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected