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

Function test_parse_timeframe

python/ccxt/test/base/test_timeframes.py:37–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35
36
37def test_parse_timeframe():
38 exchange = ccxt.Exchange({
39 'id': 'sampleexchange',
40 })
41 assert exchange.parse_timeframe('1m') == 60
42 assert exchange.parse_timeframe('5m') == 300
43 assert exchange.parse_timeframe('1h') == 3600
44 assert exchange.parse_timeframe('1d') == 86400
45 assert exchange.parse_timeframe('1w') == 604800
46 assert exchange.parse_timeframe('1M') == 2592000 # todo: just approx
47 assert exchange.parse_timeframe('1y') == 31536000 # todo: just approx
48
49
50def test_timeframes():

Callers 1

test_timeframesFunction · 0.85

Calls 2

parse_timeframeMethod · 0.95
ExchangeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…