Skip to content

Commit

Permalink
Remove tests/util
Browse files Browse the repository at this point in the history
  • Loading branch information
edtechre committed Mar 17, 2024
1 parent f003d21 commit acd134e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 15 deletions.
11 changes: 11 additions & 0 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
StaticScope,
)
from pybroker.vect import highv, lowv, sumv
from typing import NamedTuple

MODEL_NAME = "fake_model"

Expand All @@ -48,6 +49,16 @@ def predict(self, _):
return self._preds


class LazyFixture(NamedTuple):
name: str


def get_fixture(request, param):
if isinstance(param, LazyFixture):
return request.getfixturevalue(param.name)
return param


@pytest.fixture()
def data_source_df():
return pd.read_pickle(
Expand Down
1 change: 0 additions & 1 deletion tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import re
import yfinance
from .fixtures import * # noqa: F401
from .util import * # noqa: F401
from datetime import datetime
from pybroker.cache import DataSourceCacheKey
from pybroker.common import to_seconds
Expand Down
1 change: 0 additions & 1 deletion tests/test_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import re
from pybroker.cache import CacheDateFields
from .fixtures import * # noqa: F401
from .util import * # noqa: F401
from pybroker.common import BarData, DataCol, IndicatorSymbol, to_datetime
from pybroker.indicator import (
Indicator,
Expand Down
1 change: 0 additions & 1 deletion tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import pytest
import re
from .fixtures import * # noqa: F401
from .util import * # noqa: F401
from unittest.mock import Mock
from pybroker.cache import CacheDateFields
from pybroker.common import ModelSymbol, TrainedModel, to_datetime
Expand Down
1 change: 0 additions & 1 deletion tests/test_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import pytest
import re
from .fixtures import * # noqa: F401
from .util import * # noqa: F401
from collections import defaultdict, deque
from datetime import datetime
from decimal import Decimal
Expand Down
11 changes: 0 additions & 11 deletions tests/util.py

This file was deleted.

0 comments on commit acd134e

Please sign in to comment.