mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-08-09 12:20:54 +08:00
fix some imports
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import pytest
|
||||
import pandas as pd
|
||||
|
||||
from pts.dataset import ProcessStartField
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"freq, expected",
|
||||
[
|
||||
("B", "2019-11-01"),
|
||||
("W", "2019-11-03"),
|
||||
("M", "2019-11-30"),
|
||||
("12M", "2019-11-30"),
|
||||
("A-DEC", "2019-12-31"),
|
||||
],
|
||||
)
|
||||
def test_process_start_field(freq, expected):
|
||||
process = ProcessStartField.process
|
||||
given = "2019-11-01 12:34:56"
|
||||
|
||||
assert process(given, freq) == pd.Timestamp(expected, freq)
|
||||
Reference in New Issue
Block a user