Skip to content

Commit

Permalink
Use minutes resolution in test opal
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianDAlessandro committed Nov 30, 2023
1 parent 38f6edc commit dc6e665
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_opal.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def test_append_opal_data(opal_data):

# Checks that data appended to Dataframe matches data input.
data_1["time"] = pd.Timestamp(OPAL_START_DATE) + pd.to_timedelta(
data_1["time"], unit="S"
data_1["time"], unit="m"
)
data_2["time"] = pd.Timestamp(OPAL_START_DATE) + pd.to_timedelta(
data_2["time"], unit="S"
data_2["time"], unit="m"
)

assert (df.loc[1] == list(data_1.values())[1:]).all()
Expand All @@ -58,7 +58,7 @@ def test_append_opal_data(opal_data):
assert len(df.index) == 2

data_3["time"] = pd.Timestamp(OPAL_START_DATE) + pd.to_timedelta(
data_3["time"], unit="S"
data_3["time"], unit="m"
)

assert (df.loc[2] == list(data_3.values())[1:]).all()
Expand Down Expand Up @@ -100,6 +100,6 @@ def test_append_opal_data_array(opal_data_array):

assert df.shape == (1, len(opal_headers))

data_1[1] = pd.Timestamp(OPAL_START_DATE) + pd.to_timedelta(data_1[1], unit="S")
data_1[1] = pd.Timestamp(OPAL_START_DATE) + pd.to_timedelta(data_1[1], unit="m")

assert (df.loc[1] == data_1[1:]).all()

0 comments on commit dc6e665

Please sign in to comment.