Skip to content

Commit

Permalink
add skip_if_not_sqlite to failing Studio tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon committed Aug 14, 2024
1 parent 1de7bd3 commit 39e5942
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions tests/unit/lib/test_datachain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,7 @@ def test_mutate_with_expression_without_type(catalog):
)


@skip_if_not_sqlite
def test_from_values_nan_inf(tmp_dir, catalog):
vals = [float("nan"), float("inf"), float("-inf")]
dc = DataChain.from_values(vals=vals)
Expand All @@ -1553,6 +1554,7 @@ def test_from_values_nan_inf(tmp_dir, catalog):
assert np.isneginf(res[2])


@skip_if_not_sqlite
def test_from_pandas_nan_inf(tmp_dir, catalog):
vals = [float("nan"), float("inf"), float("-inf")]
df = pd.DataFrame({"vals": vals})
Expand All @@ -1563,6 +1565,7 @@ def test_from_pandas_nan_inf(tmp_dir, catalog):
assert np.isneginf(res[2])


@skip_if_not_sqlite
def test_from_parquet_nan_inf(tmp_dir, catalog):
vals = [float("nan"), float("inf"), float("-inf")]
tbl = pa.table({"vals": vals})
Expand All @@ -1576,6 +1579,7 @@ def test_from_parquet_nan_inf(tmp_dir, catalog):
assert np.isneginf(res[2])


@skip_if_not_sqlite
def test_from_csv_nan_inf(tmp_dir, catalog):
vals = [float("nan"), float("inf"), float("-inf")]
df = pd.DataFrame({"vals": vals})
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/lib/test_datachain_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class TeamMember(BaseModel):
]


@skip_if_not_sqlite
def test_merge_objects(test_session):
skip_if_not_sqlite()
ch1 = DataChain.from_values(emp=employees, session=test_session)
ch2 = DataChain.from_values(team=team, session=test_session)
ch = ch1.merge(ch2, "emp.person.name", "team.player")
Expand Down Expand Up @@ -104,8 +104,8 @@ def test_merge_similar_objects(test_session):
assert len(list(ch_inner.collect())) == 2


@skip_if_not_sqlite
def test_merge_values(test_session):
skip_if_not_sqlite()
order_ids = [11, 22, 33, 44]
order_descr = ["water", "water", "paper", "water"]

Expand Down

0 comments on commit 39e5942

Please sign in to comment.