Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
'country': ['error']
},
{
'country': 'error'
},
]
for param in params:
try:
investpy.get_stocks(country=param['country'])
except:
pass
try:
investpy.get_stocks_list(country=param['country'])
except:
pass
params = [
{
'country': ['error'],
'columns': None,
'as_json': False
},
{
'country': 'spain',
'columns': None,
'as_json': 'error'
},
{
'country': 'spain',
'labels': ['A', 'B'],
'identify': 'down',
},
{
'stock': 'BBVA',
'country': 'Spain',
'from_date': '01/01/2018',
'to_date': '01/01/2019',
'window_size': 5,
'trend_limit': 2,
'labels': None,
'identify': 'down',
}
]
stocks = get_stocks_list(country='Spain')
for stock in stocks[:25]:
obj = {
'stock': stock,
'country': 'Spain',
'from_date': '01/01/2018',
'to_date': '01/01/2019',
'window_size': 5,
'trend_limit': 5,
'labels': None,
'identify': 'both',
}
params.append(obj)
for param in params:
"""
This function checks that stock data retrieval functions listed in investpy work properly.
"""
params = [
{
'country': 'spain',
},
{
'country': None,
},
]
for param in params:
investpy.get_stocks(country=param['country'])
investpy.get_stocks_list(country=param['country'])
params = [
{
'country': None,
'columns': ['full_name', 'name'],
'as_json': True
},
{
'country': None,
'columns': ['full_name', 'name'],
'as_json': False
},
{
'country': 'spain',
'columns': ['full_name', 'name'],
'as_json': True