MCPcopy Index your code
hub / github.com/ccxt/ccxt / run_tests

Method run_tests

python/ccxt/test/tests_async.py:400–423  ·  view source on GitHub ↗
(self, exchange, tests, is_public_test)

Source from the content-addressed store, hash-verified

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