Skip to content

Commit 2f123c4

Browse files
committed
more unit tests
1 parent bacf38f commit 2f123c4

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

tests/unit/store/test_version_store_audit.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
import pytest
44
import pandas as pd
55

6-
from arctic.store.audit import ArcticTransaction
6+
from arctic.store.audit import ArcticTransaction, DataChange
77
from arctic.store.version_store import VersionedItem, VersionStore
88
from arctic.exceptions import ConcurrentModificationException, NoDataFoundException
99

1010

11+
def test_data_change():
12+
d = DataChange("a", "b")
13+
assert(d.date_range == "a")
14+
assert(d.new_data == "b")
15+
16+
1117
def test_ArcticTransaction_simple():
1218
vs = Mock(spec=VersionStore)
1319
ts1 = pd.DataFrame(index=[1, 2], data={'a':[1.0, 2.0]})

tests/unit/test_multi_index.py

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import numpy as np
99
import pandas as pd
1010
from tests.util import read_str_as_pandas
11+
import pytest
1112

1213

1314
def get_bitemporal_test_data():
@@ -251,3 +252,9 @@ def test__can_append_row():
251252
assert len(df) == 5
252253
assert df.loc[dt('2014-01-05')]['OPEN'] == 9
253254
assert df.loc[dt('2014-01-05')]['CLOSE'] == 90
255+
256+
257+
def test_fancy_group_by_raises():
258+
with pytest.raises(ValueError):
259+
assert(fancy_group_by(None, method=None))
260+

0 commit comments

Comments
 (0)