(self, exchange, tests, is_public_test)
| 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) |
no test coverage detected