From 55abd682918719b9908c2e41d91453e681da25d1 Mon Sep 17 00:00:00 2001 From: hsilan Date: Fri, 29 May 2026 15:41:03 -0700 Subject: [PATCH] ci: centralize pytest configuration in root --- .../pyproject.toml | 9 --------- .../pyproject.toml | 4 ---- .../aws-durable-execution-sdk-python/pyproject.toml | 13 ------------- pyproject.toml | 10 ++++++++-- 4 files changed, 8 insertions(+), 28 deletions(-) diff --git a/packages/aws-durable-execution-sdk-python-examples/pyproject.toml b/packages/aws-durable-execution-sdk-python-examples/pyproject.toml index 13580c4..c3c6f21 100644 --- a/packages/aws-durable-execution-sdk-python-examples/pyproject.toml +++ b/packages/aws-durable-execution-sdk-python-examples/pyproject.toml @@ -15,15 +15,6 @@ dependencies = [ [tool.hatch.build.targets.wheel] packages = ["src"] -[tool.pytest.ini_options] -testpaths = ["test"] -addopts = "-v --strict-markers" -pythonpath = ["."] -markers = [ - "example: marks tests as example tests (deselect with '-m \"not example\"')", - "durable_execution: marks tests that use the durable_runner fixture (not used for test selection)", -] - [tool.hatch.envs.examples.scripts] cli = "python cli.py {args}" bootstrap = "python cli.py bootstrap" diff --git a/packages/aws-durable-execution-sdk-python-otel/pyproject.toml b/packages/aws-durable-execution-sdk-python-otel/pyproject.toml index 546eb3d..bd9a123 100644 --- a/packages/aws-durable-execution-sdk-python-otel/pyproject.toml +++ b/packages/aws-durable-execution-sdk-python-otel/pyproject.toml @@ -80,7 +80,3 @@ lines-after-imports = 2 "SIM117", "TRY301", ] - -[tool.pytest.ini_options] -testpaths = ["tests"] -addopts = "-v --strict-markers" diff --git a/packages/aws-durable-execution-sdk-python/pyproject.toml b/packages/aws-durable-execution-sdk-python/pyproject.toml index 4a89b5f..ab059a0 100644 --- a/packages/aws-durable-execution-sdk-python/pyproject.toml +++ b/packages/aws-durable-execution-sdk-python/pyproject.toml @@ -73,16 +73,3 @@ lines-after-imports = 2 "SIM117", "TRY301", ] - -[tool.pytest.ini_options] -# Declare custom markers to avoid warnings with --strict-markers -markers = [ - # Used for test selection with -m example - "example: marks tests as example tests (deselect with '-m \"not example\"')", - # Used for configuration - passes handler and lambda_function_name to durable_runner fixture - "durable_execution: marks tests that use the durable_runner fixture (not used for test selection)", -] -# Default test discovery paths -testpaths = ["tests"] -# Default options for all test runs -addopts = "-v --strict-markers" diff --git a/pyproject.toml b/pyproject.toml index ff46c08..837e2ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,13 +22,19 @@ cov = "pytest --cov-report=term-missing --cov {args}" examples-integration = "pytest --runner-mode=cloud -m example packages/aws-durable-execution-sdk-python-examples/test/ -v {args}" [tool.pytest.ini_options] -addopts = "--import-mode=importlib" +# Declare custom markers to avoid warnings with --strict-markers +addopts = "-v --strict-markers --import-mode=importlib" testpaths = [ "packages/aws-durable-execution-sdk-python/tests", "packages/aws-durable-execution-sdk-python-otel/tests", "packages/aws-durable-execution-sdk-python-examples/test", ] - +markers = [ + # Used for test selection with -m example + "example: marks tests as example tests (deselect with '-m \"not example\"')", + # Used for configuration - passes handler and lambda_function_name to durable_runner fixture + "durable_execution: marks tests that use the durable_runner fixture (not used for test selection)", +] [tool.hatch.envs.types] workspace.members = ["packages/*"]