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

Function test_parse8601

python/ccxt/test/base/test_datetime.py:34–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def test_parse8601():
35 exchange = ccxt.Exchange({
36 'id': 'sampleexchange',
37 })
38 assert exchange.parse8601('1986-04-26T01:23:47.000Z') == 514862627000
39 assert exchange.parse8601('1986-04-26T01:23:47.559Z') == 514862627559
40 assert exchange.parse8601('1986-04-26T01:23:47.062Z') == 514862627062
41 assert exchange.parse8601('1986-04-26T01:23:47.06Z') == 514862627060
42 assert exchange.parse8601('1986-04-26T01:23:47.6Z') == 514862627600
43 assert exchange.parse8601('1977-13-13T00:00:00.000Z') is None
44 assert exchange.parse8601('1986-04-26T25:71:47.000Z') is None
45 assert exchange.parse8601('3333') is None
46 assert exchange.parse8601('Sr90') is None
47 assert exchange.parse8601('') is None
48 # assert (exchange.parse8601 () === undefined);
49 # todo: assert (exchange.parse8601 () === undefined);
50 assert exchange.parse8601(None) is None
51 assert exchange.parse8601({}) is None
52 assert exchange.parse8601(33) is None
53
54
55def test_parse_date():

Callers 1

test_datetimeFunction · 0.85

Calls 2

parse8601Method · 0.95
ExchangeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…