Skip to content

Commit 39e1619

Browse files
refactor: Remove pytest-durations dependency from testing and use native pytest option --durations (#2599)
packaging: Remove `testing` dependency on `pytest-durations`
1 parent 22d4eae commit 39e1619

File tree

5 files changed

+32
-36
lines changed

5 files changed

+32
-36
lines changed

cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ singer-sdk = { version="~=0.39.1", extras = ["testing"] }
4141
[tool.poetry.extras]
4242
s3 = ["fs-s3fs"]
4343

44+
[tool.pytest.ini_options]
45+
addopts = '--durations=10'
46+
4447
[tool.mypy]
4548
python_version = "3.12"
4649
warn_unused_configs = true

cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ singer-sdk = { version="~=0.39.1", extras = ["testing"] }
5151
[tool.poetry.extras]
5252
s3 = ["fs-s3fs"]
5353

54+
[tool.pytest.ini_options]
55+
addopts = '--durations=10'
56+
5457
[tool.mypy]
5558
python_version = "3.12"
5659
warn_unused_configs = true

cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ singer-sdk = { version="~=0.39.1", extras = ["testing"] }
4343
[tool.poetry.extras]
4444
s3 = ["fs-s3fs"]
4545

46+
[tool.pytest.ini_options]
47+
addopts = '--durations=10'
48+
49+
[tool.mypy]
50+
python_version = "3.12"
51+
warn_unused_configs = true
52+
4653
[tool.ruff]
4754
src = ["{{cookiecutter.library_name}}"]
4855
target-version = "py38"

poetry.lock

Lines changed: 18 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ pyarrow = { version = ">=13", optional = true }
8383

8484
# Testing dependencies installed as optional 'testing' extras
8585
pytest = {version=">=7.2.1", optional = true}
86-
pytest-durations = {version = ">=1.2.0", optional = true}
8786

8887
# installed as optional 'faker' extra
8988
faker = {version = ">=22.5,<27.0", optional = true}
@@ -110,7 +109,6 @@ docs = [
110109
s3 = ["fs-s3fs"]
111110
testing = [
112111
"pytest",
113-
"pytest-durations"
114112
]
115113
parquet = ["numpy", "pyarrow"]
116114
faker = ["faker"]
@@ -143,7 +141,7 @@ types-PyYAML = ">=6.0.12"
143141
pytest-codspeed = ">=2.2.0"
144142

145143
[tool.pytest.ini_options]
146-
addopts = '--ignore=singer_sdk/helpers/_simpleeval.py -m "not external"'
144+
addopts = '--durations=10 --ignore=singer_sdk/helpers/_simpleeval.py -m "not external"'
147145
filterwarnings = [
148146
"error",
149147
"ignore:Could not configure external gitlab tests:UserWarning",
@@ -251,7 +249,6 @@ DEP002 = [
251249
"sphinx-reredirects",
252250
# Plugins
253251
"fs-s3fs",
254-
"pytest-durations",
255252
]
256253

257254
[tool.mypy]

0 commit comments

Comments
 (0)