kaizenflow
kaizenflow copied to clipboard
Unit test compute_bar_start_timestamps()
There is a compute_bar_start_timestamps() in core/finance/prediction_processing.py (link) that is being used in the lib
We need to add unit tests using synthetic test data:
- Create simple short input signal that is Series/DataFrame
- Run the function on it and compare the outcome with string signature (for ref see tests in
amp/helpers/test/test_hpandas.pye.g.Test_merge_dfs1)
We need 3 test methods:
- [ ] Input if a DataFrame with a valid timestamp index with freq
- [ ] Input if a Series with a valid timestamp index with freq
- [ ] Input if a DataFrame with a not valid timestamp index, no freq (assert the error message)
See unit test doc to follow the code style Also highly recommend to read this doc before submitting 1st PR
FYI @gpsaggese @sonaalKant @DanilYachmenev