Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Commit

Permalink
fix: rename integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBernstorff committed Oct 10, 2022
1 parent 8b370dc commit 0e30f40
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ repos:
hooks:
- id: pytest
name: Run integration tests before push
entry: .venv/bin/pytest -m integration_test
entry: .venv/bin/pytest -m pre_push_test
language: script
stages: [push]
pass_filenames: false
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extension-pkg-allow-list = "wandb"

[tool.pytest.ini_options]
markers = [
"integration_test: Tests run on push. Should be as minimal as possible",
"pre_push_test: Tests run on push. Should be as minimal as possible to maintain fast push speeds.",
]

[tool.isort]
Expand Down
5 changes: 3 additions & 2 deletions tests/test_train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ def test_main(model_name):
main(cfg)


@pytest.mark.integration_test
@pytest.mark.pre_push_test
def test_integration_test():
"""test main using a variety of model."""
"""test main using the logistic model. Used for quickly testing functions before a push."""
with initialize(version_base=None, config_path="../src/psycopt2d/config/"):
cfg = compose(
config_name="integration_testing.yaml",
overrides=["+model=logistic-regression"],
)
main(cfg)


def test_crossvalidation():
"""Test crossvalidation."""
with initialize(version_base=None, config_path="../src/psycopt2d/config/"):
Expand Down

0 comments on commit 0e30f40

Please sign in to comment.