BLD: specific parameters in unit test

This commit is contained in:
Frederic Fortier
2018-03-08 13:39:05 -05:00
parent 68f92dedd6
commit 42aac37f34
2 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -48,11 +48,11 @@ class TestExchangeBundle:
exchange = get_exchange(exchange_name)
exchange_bundle = ExchangeBundle(exchange_name)
assets = [
exchange.get_asset('bat_btc')
exchange.get_asset('cmt_bnb')
]
start = pd.to_datetime('2018-03-01', utc=True)
end = pd.to_datetime('2018-03-04', utc=True)
end = pd.to_datetime('2018-03-07', utc=True)
# start = None
# end = None
@@ -205,18 +205,20 @@ class TestSuiteBundle:
exchange.init()
frequencies = exchange.get_candle_frequencies(data_frequency)
freq = random.sample(frequencies, 1)[0]
# freq = random.sample(frequencies, 1)[0]
freq = '15T'
rnd = random.SystemRandom()
# field = rnd.choice(['open', 'high', 'low', 'close', 'volume'])
field = rnd.choice(['close'])
bar_count = random.randint(3, 6)
# bar_count = random.randint(3, 6)
bar_count = 5
# assets = select_random_assets(
# exchange.assets, asset_population
# )
assets = [exchange.get_asset('bat_btc')]
end_dt = pd.to_datetime('2018-03-03', utc=True)
assets = [exchange.get_asset('cmt_bnb')]
end_dt = pd.to_datetime('2018-03-07', utc=True)
for asset in assets:
attribute = 'end_{}'.format(data_frequency)
asset_end_dt = getattr(asset, attribute)