pytest-codspeed 4.1.1__tar.gz → 4.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_codspeed-4.1.1/src/pytest_codspeed.egg-info → pytest_codspeed-4.2.0}/PKG-INFO +2 -1
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/pyproject.toml +3 -2
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/__init__.py +2 -2
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/valgrind.py +6 -1
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/plugin.py +6 -4
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0/src/pytest_codspeed.egg-info}/PKG-INFO +2 -1
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/LICENSE +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/README.md +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/setup.cfg +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/setup.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/config.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/__init__.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/__init__.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/build.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/dist_instrument_hooks.pyi +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/instrument-hooks/dist/core.c +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/callgrind.h +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/core.h +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/valgrind.h +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/zig.h +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/instrument-hooks/scripts/release.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/walltime.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/py.typed +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/utils.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed.egg-info/SOURCES.txt +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed.egg-info/dependency_links.txt +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed.egg-info/entry_points.txt +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed.egg-info/requires.txt +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed.egg-info/top_level.txt +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/tests/test_pytest_plugin.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/tests/test_pytest_plugin_cpu_instrumentation.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/tests/test_pytest_plugin_walltime.py +0 -0
- {pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-codspeed
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.2.0
|
|
4
4
|
Summary: Pytest plugin to create CodSpeed benchmarks
|
|
5
5
|
Author-email: Arthur Pastel <arthur@codspeed.io>
|
|
6
6
|
License: The MIT License (MIT)
|
|
@@ -40,6 +40,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
40
40
|
Classifier: Programming Language :: Python :: 3.11
|
|
41
41
|
Classifier: Programming Language :: Python :: 3.12
|
|
42
42
|
Classifier: Programming Language :: Python :: 3.13
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
43
44
|
Classifier: Topic :: Software Development :: Testing
|
|
44
45
|
Classifier: Topic :: System :: Benchmark
|
|
45
46
|
Classifier: Topic :: Utilities
|
|
@@ -24,6 +24,7 @@ classifiers = [
|
|
|
24
24
|
"Programming Language :: Python :: 3.11",
|
|
25
25
|
"Programming Language :: Python :: 3.12",
|
|
26
26
|
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Programming Language :: Python :: 3.14",
|
|
27
28
|
"Topic :: Software Development :: Testing",
|
|
28
29
|
"Topic :: System :: Benchmark",
|
|
29
30
|
"Topic :: Utilities",
|
|
@@ -49,7 +50,7 @@ pytest-codspeed = { workspace = true }
|
|
|
49
50
|
[dependency-groups]
|
|
50
51
|
dev = [
|
|
51
52
|
"pytest-codspeed",
|
|
52
|
-
"mypy ~= 1.
|
|
53
|
+
"mypy ~= 1.18.2",
|
|
53
54
|
"ruff ~= 0.11.12",
|
|
54
55
|
"pytest ~= 7.0",
|
|
55
56
|
"pytest-cov ~= 4.0.0",
|
|
@@ -71,7 +72,7 @@ version = { attr = "pytest_codspeed.__version__" }
|
|
|
71
72
|
|
|
72
73
|
|
|
73
74
|
[tool.bumpver]
|
|
74
|
-
current_version = "4.
|
|
75
|
+
current_version = "4.2.0"
|
|
75
76
|
version_pattern = "MAJOR.MINOR.PATCH[-TAG[NUM]]"
|
|
76
77
|
commit_message = "Release v{new_version} 🚀"
|
|
77
78
|
tag_message = "Release v{new_version} 🚀"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import os
|
|
3
4
|
import warnings
|
|
4
5
|
from typing import TYPE_CHECKING
|
|
5
6
|
|
|
@@ -27,7 +28,11 @@ class ValgrindInstrument(Instrument):
|
|
|
27
28
|
try:
|
|
28
29
|
self.instrument_hooks = InstrumentHooks()
|
|
29
30
|
self.instrument_hooks.set_integration("pytest-codspeed", __semver_version__)
|
|
30
|
-
except RuntimeError:
|
|
31
|
+
except RuntimeError as e:
|
|
32
|
+
if os.environ.get("CODSPEED_ENV") is not None:
|
|
33
|
+
raise Exception(
|
|
34
|
+
"Failed to initialize CPU simulation instrument hooks"
|
|
35
|
+
) from e
|
|
31
36
|
self.instrument_hooks = None
|
|
32
37
|
|
|
33
38
|
self.should_measure = self.instrument_hooks is not None
|
|
@@ -8,7 +8,7 @@ import random
|
|
|
8
8
|
from dataclasses import dataclass, field
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from time import time
|
|
11
|
-
from typing import TYPE_CHECKING
|
|
11
|
+
from typing import TYPE_CHECKING, cast
|
|
12
12
|
|
|
13
13
|
import pytest
|
|
14
14
|
from _pytest.fixtures import FixtureManager
|
|
@@ -96,7 +96,7 @@ PLUGIN_NAME = "codspeed_plugin"
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
def get_plugin(config: pytest.Config) -> CodSpeedPlugin:
|
|
99
|
-
return config.pluginmanager.get_plugin(PLUGIN_NAME)
|
|
99
|
+
return cast("CodSpeedPlugin", config.pluginmanager.get_plugin(PLUGIN_NAME))
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
@pytest.hookimpl(tryfirst=True)
|
|
@@ -159,13 +159,15 @@ def pytest_plugin_registered(plugin, manager: pytest.PytestPluginManager):
|
|
|
159
159
|
plugin, FixtureManager
|
|
160
160
|
):
|
|
161
161
|
fixture_manager = plugin
|
|
162
|
-
codspeed_plugin: CodSpeedPlugin =
|
|
162
|
+
codspeed_plugin: CodSpeedPlugin = cast(
|
|
163
|
+
"CodSpeedPlugin", manager.get_plugin(PLUGIN_NAME)
|
|
164
|
+
)
|
|
163
165
|
if codspeed_plugin.is_codspeed_enabled:
|
|
164
166
|
codspeed_benchmark_fixtures = plugin.getfixturedefs(
|
|
165
167
|
"codspeed_benchmark",
|
|
166
168
|
fixture_manager.session.nodeid
|
|
167
169
|
if BEFORE_PYTEST_8_1_1
|
|
168
|
-
else fixture_manager.session,
|
|
170
|
+
else cast("str", fixture_manager.session),
|
|
169
171
|
)
|
|
170
172
|
assert codspeed_benchmark_fixtures is not None
|
|
171
173
|
# Archive the alternative benchmark fixture
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-codspeed
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.2.0
|
|
4
4
|
Summary: Pytest plugin to create CodSpeed benchmarks
|
|
5
5
|
Author-email: Arthur Pastel <arthur@codspeed.io>
|
|
6
6
|
License: The MIT License (MIT)
|
|
@@ -40,6 +40,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
40
40
|
Classifier: Programming Language :: Python :: 3.11
|
|
41
41
|
Classifier: Programming Language :: Python :: 3.12
|
|
42
42
|
Classifier: Programming Language :: Python :: 3.13
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
43
44
|
Classifier: Topic :: Software Development :: Testing
|
|
44
45
|
Classifier: Topic :: System :: Benchmark
|
|
45
46
|
Classifier: Topic :: Utilities
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/__init__.py
RENAMED
|
File without changes
|
{pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed/instruments/hooks/build.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/src/pytest_codspeed.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_codspeed-4.1.1 → pytest_codspeed-4.2.0}/tests/test_pytest_plugin_cpu_instrumentation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|