-
Notifications
You must be signed in to change notification settings - Fork 679
/
Copy path__init__.py
90 lines (84 loc) · 1.94 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import os
import sys
from ._version import __version__
from .data import (
DataReader,
Options,
get_components_yahoo,
get_dailysummary_iex,
get_data_alphavantage,
get_data_econdb,
get_data_enigma,
get_data_famafrench,
get_data_fred,
get_data_moex,
get_data_quandl,
get_data_stooq,
get_data_tiingo,
get_data_yahoo,
get_data_yahoo_actions,
get_iex_book,
get_iex_data_tiingo,
get_iex_symbols,
get_last_iex,
get_markets_iex,
get_nasdaq_symbols,
get_quote_yahoo,
get_recent_iex,
get_records_iex,
get_summary_iex,
get_tops_iex,
)
PKG = os.path.dirname(__file__)
__all__ = [
"__version__",
"get_components_yahoo",
"get_data_econdb",
"get_data_enigma",
"get_data_famafrench",
"get_data_yahoo",
"get_data_yahoo_actions",
"get_quote_yahoo",
"get_iex_book",
"get_iex_symbols",
"get_last_iex",
"get_markets_iex",
"get_recent_iex",
"get_records_iex",
"get_summary_iex",
"get_tops_iex",
"get_nasdaq_symbols",
"get_data_quandl",
"get_data_moex",
"get_data_fred",
"get_dailysummary_iex",
"get_data_stooq",
"DataReader",
"Options",
"get_data_tiingo",
"get_iex_data_tiingo",
"get_data_alphavantage",
"test",
]
def test(extra_args=None):
"""
Run the test suite
Parameters
----------
extra_args : {str, List[str]}
A string or list of strings to pass to pytest. Default is
["--only-stable", "--skip-requires-api-key"]
"""
try:
import pytest
except ImportError as err:
raise ImportError("Need pytest>=5.0.1 to run tests") from err
cmd = ["--only-stable", "--skip-requires-api-key"]
if extra_args:
if not isinstance(extra_args, list):
extra_args = [extra_args]
cmd = extra_args
cmd += [PKG]
joined = " ".join(cmd)
print(f"running: pytest {joined}")
sys.exit(pytest.main(cmd))