Move dataframe trim to within jsondatahandler
This commit is contained in:
@@ -369,8 +369,9 @@ def test_load_partial_missing(testdatadir, caplog) -> None:
|
||||
# timedifference in 5 minutes
|
||||
td = ((end - start).total_seconds() // 60 // 5) + 1
|
||||
assert td != len(tickerdata['UNITTEST/BTC'])
|
||||
# This validation happens now after parsing to pandas.
|
||||
end_real = arrow.get(tickerdata['UNITTEST/BTC'].iloc[-1, 0])
|
||||
|
||||
# Shift endtime with +5 - as last candle is dropped (partial candle)
|
||||
end_real = arrow.get(tickerdata['UNITTEST/BTC'].iloc[-1, 0]).shift(minutes=5)
|
||||
assert log_has(f'Missing data at end for pair '
|
||||
f'UNITTEST/BTC, data ends at {end_real.strftime("%Y-%m-%d %H:%M:%S")}',
|
||||
caplog)
|
||||
|
Reference in New Issue
Block a user