Skip to content

Commit 3ff1e31

Browse files
committed
test: don't use fixture if it's only used once
1 parent f21c5ea commit 3ff1e31

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

tests/data/test_datahandler.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,6 @@ def trades_full(feather_dh):
520520
return df
521521

522522

523-
@pytest.fixture
524-
def timerange_full(trades_full):
525-
# Pick a full-span window using actual timestamps
526-
startts = int(trades_full["timestamp"].min())
527-
stopts = int(trades_full["timestamp"].max())
528-
return TimeRange("date", "date", startts=startts, stopts=stopts)
529-
530-
531523
@pytest.fixture
532524
def timerange_mid(trades_full):
533525
# Pick a mid-range window using actual timestamps
@@ -536,7 +528,13 @@ def timerange_mid(trades_full):
536528
return TimeRange("date", "date", startts=mid_start, stopts=mid_end)
537529

538530

539-
def test_feather_trades_timerange_filter_fullspan(feather_dh, trades_full, timerange_full):
531+
def test_feather_trades_timerange_filter_fullspan(feather_dh, trades_full):
532+
timerange_full = TimeRange(
533+
"date",
534+
"date",
535+
startts=int(trades_full["timestamp"].min()),
536+
stopts=int(trades_full["timestamp"].max()),
537+
)
540538
# Full-span filter should equal unfiltered
541539
filtered = feather_dh.trades_load("XRP/ETH", TradingMode.SPOT, timerange=timerange_full)
542540
assert_frame_equal(

0 commit comments

Comments
 (0)