You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
545 B
21 lines
545 B
|
|
import unittest
|
|
|
|
from fincal.fincal import TimeSeries
|
|
|
|
|
|
class TestFincal(unittest.TestCase):
|
|
def test_ts(self):
|
|
data = [
|
|
('2020-01-01', 23),
|
|
('2020-01-02', 24),
|
|
('2020-01-03', 25),
|
|
('2020-01-06', 26),
|
|
('2020-01-07', 27),
|
|
('2020-01-08', 28),
|
|
('2020-01-10', 29),
|
|
('2020-01-11', 30)
|
|
]
|
|
time_series = TimeSeries(data)
|
|
time_series.ffill(inplace=True)
|
|
self.assertEqual(len(time_series.time_series), 11)
|
|
|