Skip to content

Commit

Permalink
/* PR_START p--py312 14 */ Mark slow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
plypaul committed Jun 4, 2024
1 parent e9aa774 commit dce1287
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-metricflow-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: ./.github/actions/run-mf-tests
with:
python-version: ${{ matrix.python-version }}
make-target: "test-include-slow"

metricflow-unit-tests-postgres:
name: MetricFlow Tests (PostgreSQL)
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ install-hatch:
.PHONY: test
test:
cd metricflow-semantics && hatch -v run dev-env:pytest -vv -n $(PARALLELISM) $(ADDITIONAL_PYTEST_OPTIONS) $(TESTS_METRICFLOW_SEMANTICS)/
hatch -v run dev-env:pytest -vv -n $(PARALLELISM) -m "not slow" $(ADDITIONAL_PYTEST_OPTIONS) $(TESTS_METRICFLOW)/

.PHONY: test-slow
test-include-slow:
hatch -v run dev-env:pytest -vv -n $(PARALLELISM) $(ADDITIONAL_PYTEST_OPTIONS) $(TESTS_METRICFLOW)/

.PHONY: test-postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,7 @@ def test_metric_in_metric_where_filter(
)


@pytest.mark.slow
def test_all_available_metric_filters(
dataflow_plan_builder: DataflowPlanBuilder, query_parser: MetricFlowQueryParser
) -> None:
Expand Down
4 changes: 4 additions & 0 deletions tests_metricflow/fixtures/setup_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def pytest_configure(config: _pytest.config.Config) -> None:
name="markers",
line=f"{SQL_ENGINE_SNAPSHOT_MARKER_NAME}: mark tests as generating a snapshot specific to a SQL engine",
)
config.addinivalue_line(
name="markers",
line="slow: mark tests as taking a long time to run.",
)


def check_sql_engine_snapshot_marker(request: FixtureRequest) -> None:
Expand Down

0 comments on commit dce1287

Please sign in to comment.