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

Method run_public_tests

python/ccxt/test/tests_async.py:355–398  ·  view source on GitHub ↗
(self, exchange, symbols)

Source from the content-addressed store, hash-verified

353 return True
354
355 async def run_public_tests(self, exchange, symbols):
356 primary_symbol = symbols[0]
357 tests = {
358 'features': [],
359 'afterConstruct': [],
360 'fetchCurrencies': [],
361 'fetchTicker': [primary_symbol],
362 'fetchTickers': [primary_symbol],
363 'fetchLastPrices': [primary_symbol],
364 'fetchOHLCV': [primary_symbol],
365 'fetchTrades': [primary_symbol],
366 'fetchOrderBook': [primary_symbol],
367 'fetchOrderBooks': [],
368 'fetchBidsAsks': [],
369 'fetchStatus': [],
370 'fetchTime': [],
371 }
372 if self.ws_tests:
373 tests = {
374 'watchOHLCV': [primary_symbol],
375 'watchOHLCVForSymbols': [primary_symbol],
376 'watchTicker': [primary_symbol],
377 'watchTickers': [primary_symbol],
378 'watchBidsAsks': [primary_symbol],
379 'watchOrderBook': [primary_symbol],
380 'watchOrderBookForSymbols': [symbols],
381 'watchTrades': [primary_symbol],
382 'watchTradesForSymbols': [symbols],
383 }
384 market = exchange.market(primary_symbol)
385 is_spot = market['spot']
386 if not self.ws_tests:
387 if is_spot:
388 tests['fetchCurrencies'] = []
389 else:
390 tests['fetchFundingRates'] = [primary_symbol]
391 tests['fetchFundingRate'] = [primary_symbol]
392 tests['fetchFundingRateHistory'] = [primary_symbol]
393 tests['fetchIndexOHLCV'] = [primary_symbol]
394 tests['fetchMarkOHLCV'] = [primary_symbol]
395 tests['fetchPremiumIndexOHLCV'] = [primary_symbol]
396 self.public_tests = tests
397 await self.run_tests(exchange, tests, True)
398 return True
399
400 async def run_tests(self, exchange, tests, is_public_test):
401 test_names = list(tests.keys())

Callers 1

test_exchangeMethod · 0.95

Calls 2

run_testsMethod · 0.95
marketMethod · 0.45

Tested by

no test coverage detected