Skip to content

Commit

Permalink
disable slow tests by default, enable on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DropD committed Jan 31, 2025
1 parent ede3276 commit 2c5eccb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
env:
PYTEST_ADDOPTS: "--durations=0"
run: |
hatch test --cover
hatch test -m "" --cover # override default exclusion of slow tests with -m ""
docs:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ Changelog = "https://github.com/C2SM/Sirocco/blob/main/CHANGELOG.md"
# Configuration for [pytest](https://docs.pytest.org)
addopts = "--pdbcls=IPython.terminal.debugger:TerminalPdb"
norecursedirs = "tests/cases"
markers = [
"slow: slow integration tests which are not recommended to run locally for normal development"
]

[tool.coverage.run]
# Configuration of [coverage.py](https://coverage.readthedocs.io)
Expand Down Expand Up @@ -83,7 +86,7 @@ extra-dependencies = [
"ipdb"
]
default-args = []
extra-args = ["--doctest-modules"]
extra-args = ["--doctest-modules", '-m not slow']

[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.12"]
Expand Down
2 changes: 1 addition & 1 deletion src/sirocco/core/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def from_config_file(cls: type[Self], config_path: str) -> Self:
return cls.from_config_workflow(ConfigWorkflow.from_config_file(config_path))

@classmethod
def from_config_workflow(cls: type[Self], config_workflow: ConfigWorkflow) -> Workflow:
def from_config_workflow(cls: type[Self], config_workflow: ConfigWorkflow) -> Self:
return cls(
name=config_workflow.name,
config_rootdir=config_workflow.rootdir,
Expand Down
1 change: 1 addition & 0 deletions tests/test_wc_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def test_vizgraph(config_paths):


# configs that are tested for running workgraph
@pytest.mark.slow
@pytest.mark.parametrize(
"config_path",
[
Expand Down

0 comments on commit 2c5eccb

Please sign in to comment.