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