Skip to content

Commit 4d0f454

Browse files
committed
Improved tests
1 parent 24fcb5a commit 4d0f454

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/czitools/_tests/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
import pandas as pd
23

34
# Predefined planetable dict fixture for tests
45
PLANETABLE_DICT = {
@@ -36,3 +37,14 @@ def _attach_planetable_to_unittest_instance(request, planetable_dict):
3637
setattr(instance, "planetable_dict", planetable_dict)
3738
return planetable_dict
3839

40+
41+
@pytest.fixture
42+
def df():
43+
"""Simple DataFrame used by tests that expect Time [s] and Value columns."""
44+
return pd.DataFrame({"Time [s]": [0, 1, 2, 3], "Value": [10, 20, 30, 40]})
45+
46+
47+
@pytest.fixture
48+
def planetable(planetable_dict):
49+
"""Return a pandas DataFrame built from the predefined planetable dict."""
50+
return pd.DataFrame(planetable_dict)

0 commit comments

Comments
 (0)