Skip to content

Mark some tests as long #929

Merged
merged 5 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ jobs:

- name: PyTest ("not long")
run: |
poetry run pytest tests -v --cov=etna -m "not long" --cov-report=xml
poetry run pytest etna -v --doctest-modules
poetry run pytest tests -v --cov=etna -m "not long" --cov-report=xml --durations=10
poetry run pytest etna -v --doctest-modules --durations=10

- name: Upload coverage
uses: codecov/codecov-action@v2
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:

- name: PyTest ("long")
run: |
poetry run pytest tests -v --cov=etna -m "long" --cov-report=xml
poetry run pytest tests -v --cov=etna -m "long" --cov-report=xml --durations=10

- name: Upload coverage
uses: codecov/codecov-action@v2
Expand Down Expand Up @@ -141,8 +141,8 @@ jobs:

- name: PyTest ("tsdataset transforms")
run: |
poetry run pytest tests/test_datasets -v --cov=etna --cov-report=xml
poetry run pytest tests/test_transforms -v --cov=etna --cov-report=xml
poetry run pytest tests/test_datasets -v --cov=etna --cov-report=xml --durations=10
poetry run pytest tests/test_transforms -v --cov=etna --cov-report=xml --durations=10

- name: Upload coverage
uses: codecov/codecov-action@v2
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
-
- Make slicing faster in `TSDataset._merge_exog`, `FilterFeaturesTransform`, `AddConstTransform`, `LambdaTransform`, `LagTransform`, `LogTransform`, `SklearnTransform`, `WindowStatisticsTransform`; make CICD test different pandas versions ([#900](https://github.com/tinkoff-ai/etna/pull/900))
-
-
-
-
- Mark some tests as long ([#929](https://github.com/tinkoff-ai/etna/pull/929))
-
### Fixed
-
Expand Down
1 change: 1 addition & 0 deletions tests/test_ensembles/test_stacking_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def test_multiprocessing_ensembles(
assert (single_jobs_forecast.df == multi_jobs_forecast.df).all().all()


@pytest.mark.long
@pytest.mark.parametrize("n_jobs", (1, 5))
def test_backtest(stacking_ensemble_pipeline: StackingEnsemble, example_tsds: TSDataset, n_jobs: int):
"""Check that backtest works with StackingEnsemble."""
Expand Down
1 change: 1 addition & 0 deletions tests/test_ensembles/test_voting_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def test_multiprocessing_ensembles(
assert (single_jobs_forecast.df == multi_jobs_forecast.df).all().all()


@pytest.mark.long
@pytest.mark.parametrize("n_jobs", (1, 5))
def test_backtest(voting_ensemble_pipeline: VotingEnsemble, example_tsds: TSDataset, n_jobs: int):
"""Check that backtest works with VotingEnsemble."""
Expand Down
1 change: 1 addition & 0 deletions tests/test_models/nn/test_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from etna.transforms import StandardScalerTransform


@pytest.mark.long
@pytest.mark.parametrize("horizon", [8, 13])
def test_rnn_model_run_weekly_overfit_with_scaler(ts_dataset_weekly_function_with_horizon, horizon):
"""
Expand Down
11 changes: 11 additions & 0 deletions tests/test_models/test_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def _test_forecast_mixed_in_out_sample(ts, model, transforms):
assert_frame_equal(forecast_out_sample_df, forecast_full_df.iloc[-5:])


@pytest.mark.long
@pytest.mark.parametrize(
"model, transforms",
[
Expand All @@ -165,6 +166,7 @@ def test_forecast_in_sample_full(model, transforms, example_tsds):
_test_forecast_in_sample_full(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.xfail(strict=True)
@pytest.mark.parametrize(
"model, transforms",
Expand All @@ -180,6 +182,7 @@ def test_forecast_in_sample_full_failed(model, transforms, example_tsds):
_test_forecast_in_sample_full(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.parametrize(
"model, transforms",
[
Expand Down Expand Up @@ -218,6 +221,7 @@ def test_forecast_in_sample_full_not_implemented(model, transforms, example_tsds
_test_forecast_in_sample_full(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.parametrize(
"model, transforms",
[
Expand All @@ -242,6 +246,7 @@ def test_forecast_in_sample_suffix(model, transforms, example_tsds):
_test_forecast_in_sample_suffix(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.parametrize(
"model, transforms",
[
Expand Down Expand Up @@ -280,6 +285,7 @@ def test_forecast_in_sample_suffix_not_implemented(model, transforms, example_ts
_test_forecast_in_sample_suffix(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.parametrize(
"model, transforms",
[
Expand Down Expand Up @@ -332,6 +338,7 @@ def test_forecast_out_sample_prefix(model, transforms, example_tsds):
_test_forecast_out_sample_prefix(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.parametrize(
"model, transforms",
[
Expand All @@ -355,6 +362,7 @@ def test_forecast_out_sample_suffix(model, transforms, example_tsds):
_test_forecast_out_sample_suffix(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.parametrize(
"model, transforms",
[
Expand Down Expand Up @@ -391,6 +399,7 @@ def test_forecast_out_sample_suffix_not_implemented(model, transforms, example_t
_test_forecast_out_sample_suffix(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.xfail(strict=True)
@pytest.mark.parametrize(
"model, transforms",
Expand All @@ -404,6 +413,7 @@ def test_forecast_out_sample_suffix_failed(model, transforms, example_tsds):
_test_forecast_out_sample_suffix(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.parametrize(
"model, transforms",
[
Expand All @@ -425,6 +435,7 @@ def test_forecast_mixed_in_out_sample(model, transforms, example_tsds):
_test_forecast_mixed_in_out_sample(example_tsds, model, transforms)


@pytest.mark.long
@pytest.mark.parametrize(
"model, transforms",
[
Expand Down
5 changes: 4 additions & 1 deletion tests/test_models/test_tbats.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def sinusoid_ts():
"model_class, model_class_repr",
((TBATSModel, "TBATSModel"), (BATSModel, "BATSModel")),
)
def test_reper(model_class, model_class_repr):
def test_repr(model_class, model_class_repr):
kwargs = {
"use_box_cox": None,
"box_cox_bounds": None,
Expand Down Expand Up @@ -84,6 +84,7 @@ def test_not_fitted(model, linear_segments_ts_unique):
model.forecast(to_forecast)


@pytest.mark.long
@pytest.mark.parametrize("model", [TBATSModel(), BATSModel()])
def test_format(model, new_format_df):
df = new_format_df
Expand All @@ -96,6 +97,7 @@ def test_format(model, new_format_df):
assert not future_ts.isnull().values.any()


@pytest.mark.long
@pytest.mark.parametrize("model", [TBATSModel(), BATSModel()])
def test_dummy(model, sinusoid_ts):
train, test = sinusoid_ts
Expand All @@ -107,6 +109,7 @@ def test_dummy(model, sinusoid_ts):
assert value_metric < 0.33


@pytest.mark.long
@pytest.mark.parametrize("model", [TBATSModel(), BATSModel()])
def test_prediction_interval(model, example_tsds):
model.fit(example_tsds)
Expand Down
1 change: 1 addition & 0 deletions tests/test_pipeline/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ def test_sanity_backtest_naive_with_intervals(weekly_period_ts):
assert f"target_{quantiles[1]}" in features


@pytest.mark.long
def test_backtest_pass_with_filter_transform(ts_with_feature):
ts = ts_with_feature

Expand Down