pytest-codspeed 3.1.0__tar.gz → 3.1.0b0__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.
Files changed (29) hide show
  1. {pytest_codspeed-3.1.0/src/pytest_codspeed.egg-info → pytest_codspeed-3.1.0b0}/PKG-INFO +3 -1
  2. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/pyproject.toml +5 -2
  3. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/__init__.py +2 -2
  4. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0/src/pytest_codspeed.egg-info}/PKG-INFO +3 -1
  5. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed.egg-info/SOURCES.txt +1 -0
  6. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed.egg-info/requires.txt +3 -0
  7. pytest_codspeed-3.1.0b0/tests/test_generate_semver.py +19 -0
  8. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/LICENSE +0 -0
  9. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/README.md +0 -0
  10. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/setup.cfg +0 -0
  11. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/setup.py +0 -0
  12. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/instruments/__init__.py +0 -0
  13. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/instruments/valgrind/__init__.py +0 -0
  14. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/instruments/valgrind/_wrapper/__init__.py +0 -0
  15. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/instruments/valgrind/_wrapper/build.py +0 -0
  16. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/instruments/valgrind/_wrapper/wrapper.c +0 -0
  17. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/instruments/valgrind/_wrapper/wrapper.h +0 -0
  18. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/instruments/valgrind/_wrapper/wrapper.pyi +0 -0
  19. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/instruments/walltime.py +0 -0
  20. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/plugin.py +0 -0
  21. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/py.typed +0 -0
  22. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed/utils.py +0 -0
  23. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed.egg-info/dependency_links.txt +0 -0
  24. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed.egg-info/entry_points.txt +0 -0
  25. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/src/pytest_codspeed.egg-info/top_level.txt +0 -0
  26. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/tests/test_pytest_plugin.py +0 -0
  27. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/tests/test_pytest_plugin_cpu_instrumentation.py +0 -0
  28. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/tests/test_pytest_plugin_walltime.py +0 -0
  29. {pytest_codspeed-3.1.0 → pytest_codspeed-3.1.0b0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-codspeed
3
- Version: 3.1.0
3
+ Version: 3.1.0b0
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)
@@ -50,6 +50,8 @@ Requires-Dist: cffi>=1.17.1
50
50
  Requires-Dist: pytest>=3.8
51
51
  Requires-Dist: rich>=13.8.1
52
52
  Requires-Dist: importlib-metadata>=8.5.0; python_version < "3.10"
53
+ Provides-Extra: build
54
+ Requires-Dist: semver>=3.0.2; extra == "build"
53
55
  Provides-Extra: lint
54
56
  Requires-Dist: mypy~=1.11.2; extra == "lint"
55
57
  Requires-Dist: ruff~=0.6.5; extra == "lint"
@@ -37,6 +37,7 @@ dependencies = [
37
37
  ]
38
38
 
39
39
  [project.optional-dependencies]
40
+ build = ["semver>=3.0.2"]
40
41
  lint = ["mypy ~= 1.11.2", "ruff ~= 0.6.5"]
41
42
  compat = [
42
43
  "pytest-benchmark ~= 5.0.0",
@@ -60,7 +61,7 @@ version = { attr = "pytest_codspeed.__version__" }
60
61
 
61
62
 
62
63
  [tool.bumpver]
63
- current_version = "3.1.0"
64
+ current_version = "3.1.0-beta"
64
65
  version_pattern = "MAJOR.MINOR.PATCH[-TAG]"
65
66
  commit_message = "Release v{new_version} 🚀"
66
67
  tag_message = "Release v{new_version} 🚀"
@@ -87,9 +88,11 @@ test-command = "pytest -v --ignore={project}/tests/benchmarks {project}/tests"
87
88
 
88
89
  [tool.cibuildwheel.linux]
89
90
  environment = { PYTEST_CODSPEED_FORCE_EXTENSION_BUILD = "1", PYTEST_CODSPEED_FORCE_VALGRIND_TESTS = "1" }
91
+ archs = ["x86_64", "aarch64"]
90
92
  manylinux-x86_64-image = "manylinux_2_28"
91
93
  manylinux-aarch64-image = "manylinux_2_28"
92
- before-all = "yum -y install valgrind-devel"
94
+ before-all = "yum -y install valgrind-devel || apk add --upgrad valgrind-dev"
95
+ container-engine = { name = "docker", disable-host-mount = true }
93
96
 
94
97
  [tool.mypy]
95
98
  python_version = "3.12"
@@ -1,6 +1,6 @@
1
- __version__ = "3.1.0"
1
+ __version__ = "3.1.0b0"
2
2
  # We also have the semver version since __version__ is not semver compliant
3
- __semver_version__ = "3.1.0"
3
+ __semver_version__ = "3.1.0-beta"
4
4
 
5
5
  from .plugin import BenchmarkFixture
6
6
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-codspeed
3
- Version: 3.1.0
3
+ Version: 3.1.0b0
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)
@@ -50,6 +50,8 @@ Requires-Dist: cffi>=1.17.1
50
50
  Requires-Dist: pytest>=3.8
51
51
  Requires-Dist: rich>=13.8.1
52
52
  Requires-Dist: importlib-metadata>=8.5.0; python_version < "3.10"
53
+ Provides-Extra: build
54
+ Requires-Dist: semver>=3.0.2; extra == "build"
53
55
  Provides-Extra: lint
54
56
  Requires-Dist: mypy~=1.11.2; extra == "lint"
55
57
  Requires-Dist: ruff~=0.6.5; extra == "lint"
@@ -20,6 +20,7 @@ src/pytest_codspeed/instruments/valgrind/_wrapper/build.py
20
20
  src/pytest_codspeed/instruments/valgrind/_wrapper/wrapper.c
21
21
  src/pytest_codspeed/instruments/valgrind/_wrapper/wrapper.h
22
22
  src/pytest_codspeed/instruments/valgrind/_wrapper/wrapper.pyi
23
+ tests/test_generate_semver.py
23
24
  tests/test_pytest_plugin.py
24
25
  tests/test_pytest_plugin_cpu_instrumentation.py
25
26
  tests/test_pytest_plugin_walltime.py
@@ -5,6 +5,9 @@ rich>=13.8.1
5
5
  [:python_version < "3.10"]
6
6
  importlib-metadata>=8.5.0
7
7
 
8
+ [build]
9
+ semver>=3.0.2
10
+
8
11
  [compat]
9
12
  pytest-benchmark~=5.0.0
10
13
  pytest-xdist~=3.6.1
@@ -0,0 +1,19 @@
1
+ import pytest
2
+ from generate_semver import pypi_version_to_semver
3
+
4
+
5
+ def test_pypi_version_to_semver_valid():
6
+ # Test cases for valid PyPI version strings
7
+ assert pypi_version_to_semver("1.0.0") == "1.0.0"
8
+ assert pypi_version_to_semver("1.0.0a1") == "1.0.0-a1"
9
+ assert pypi_version_to_semver("1.0.0b1") == "1.0.0-b1"
10
+ assert pypi_version_to_semver("1.0.0rc1") == "1.0.0-rc1"
11
+
12
+
13
+ def test_pypi_version_to_semver_invalid():
14
+ # Test cases for invalid PyPI version strings that should raise ValueError
15
+ with pytest.raises(ValueError, match="Can't convert an epoch to semver"):
16
+ pypi_version_to_semver("1!1.0.0")
17
+
18
+ with pytest.raises(ValueError, match="Can't convert a post part to semver"):
19
+ pypi_version_to_semver("1.0.0.post")