crackerjack 0.18.7__tar.gz → 0.18.8__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.
- {crackerjack-0.18.7 → crackerjack-0.18.8}/PKG-INFO +2 -1
- crackerjack-0.18.8/crackerjack/.ruff_cache/0.11.11/18187162184424859798 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/pyproject.toml +4 -2
- {crackerjack-0.18.7 → crackerjack-0.18.8}/pyproject.toml +4 -2
- crackerjack-0.18.8/tests/conftest.py +28 -0
- crackerjack-0.18.8/tests/test_pytest_features.py +41 -0
- crackerjack-0.18.7/crackerjack/.ruff_cache/0.11.11/18187162184424859798 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/LICENSE +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/README.md +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.gitignore +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.libcst.codemod.yaml +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.pdm.toml +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.pre-commit-config.yaml +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.pytest_cache/.gitignore +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.pytest_cache/CACHEDIR.TAG +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.pytest_cache/README.md +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.pytest_cache/v/cache/nodeids +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.pytest_cache/v/cache/stepwise +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/.gitignore +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.11/3256171999636029978 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.14/602324811142551221 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.4/10355199064880463147 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.6/15140459877605758699 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.7/1790508110482614856 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.9/17041001205004563469 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.2/4070660268492669020 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.3/9818742842212983150 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.4/9818742842212983150 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.6/3557596832929915217 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.7/10386934055395314831 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.7/3557596832929915217 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.8/530407680854991027 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.2.0/10047773857155985907 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.2.1/8522267973936635051 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.2.2/18053836298936336950 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.3.0/12548816621480535786 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.3.3/11081883392474770722 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.3.4/676973378459347183 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.3.5/16311176246009842383 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.5.7/1493622539551733492 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.5.7/6231957614044513175 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.5.7/9932762556785938009 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.6.0/11982804814124138945 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.6.0/12055761203849489982 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.6.2/1206147804896221174 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.6.4/1206147804896221174 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.6.5/1206147804896221174 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.6.7/3657366982708166874 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.6.9/285614542852677309 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.7.1/1024065805990144819 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.7.1/285614542852677309 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.7.3/16061516852537040135 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.8.4/16354268377385700367 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.9.10/12813592349865671909 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.9.10/923908772239632759 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.9.3/13948373885254993391 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.9.9/12813592349865671909 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.9.9/8843823720003377982 +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/CACHEDIR.TAG +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/__init__.py +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/__main__.py +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/crackerjack.py +0 -0
- /crackerjack-0.18.7/tests/README.md → /crackerjack-0.18.8/tests/TESTING.md +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/tests/__init__.py +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/tests/data/comments_sample.txt +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/tests/data/docstrings_sample.txt +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/tests/data/expected_comments_sample.txt +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/tests/data/init.py +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/tests/test_crackerjack.py +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/tests/test_crackerjack_runner.py +0 -0
- {crackerjack-0.18.7 → crackerjack-0.18.8}/tests/test_main.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: crackerjack
|
3
|
-
Version: 0.18.
|
3
|
+
Version: 0.18.8
|
4
4
|
Summary: Default template for PDM package
|
5
5
|
Keywords: black,ruff,mypy,creosote,refurb,pyright,bandit,pytest
|
6
6
|
Author-Email: lesleslie <les@wedgwoodwebworks.com>
|
@@ -36,6 +36,7 @@ Requires-Dist: pytest-asyncio>=0.26.0
|
|
36
36
|
Requires-Dist: rich>=14.0.0
|
37
37
|
Requires-Dist: typer>=0.15.4
|
38
38
|
Requires-Dist: pytest-timeout>=2.4.0
|
39
|
+
Requires-Dist: pytest-xdist>=3.5.0
|
39
40
|
Description-Content-Type: text/markdown
|
40
41
|
|
41
42
|
# Crackerjack: Elevate Your Python Development
|
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
[tool.pytest.ini_options]
|
2
|
-
addopts = "--cov=crackerjack --cov-report=term"
|
2
|
+
addopts = "--cov=crackerjack --cov-report=term --timeout=120 --timeout-method=thread -n auto"
|
3
3
|
asyncio_default_fixture_loop_scope = "function"
|
4
4
|
python_files = ["test_*.py", "*_test.py"]
|
5
5
|
asyncio_mode = "auto"
|
@@ -99,6 +99,7 @@ exclude-deps = [
|
|
99
99
|
"pytest-asyncio",
|
100
100
|
"pytest-cov",
|
101
101
|
"pytest-mock",
|
102
|
+
"pytest-xdist",
|
102
103
|
"pdm",
|
103
104
|
"pyfiglet",
|
104
105
|
"pyyaml",
|
@@ -154,7 +155,7 @@ pythonPlatform = "Darwin"
|
|
154
155
|
|
155
156
|
[project]
|
156
157
|
name = "crackerjack"
|
157
|
-
version = "0.18.
|
158
|
+
version = "0.18.7"
|
158
159
|
description = "Default template for PDM package"
|
159
160
|
requires-python = ">=3.13"
|
160
161
|
readme = "README.md"
|
@@ -197,6 +198,7 @@ dependencies = [
|
|
197
198
|
"rich>=14.0.0",
|
198
199
|
"typer>=0.15.4",
|
199
200
|
"pytest-timeout>=2.4.0",
|
201
|
+
"pytest-xdist>=3.5.0",
|
200
202
|
]
|
201
203
|
authors = [
|
202
204
|
{ name = "lesleslie", email = "les@wedgwoodwebworks.com" },
|
@@ -1,5 +1,5 @@
|
|
1
1
|
[tool.pytest.ini_options]
|
2
|
-
addopts = "--cov=crackerjack --cov-report=term"
|
2
|
+
addopts = "--cov=crackerjack --cov-report=term --timeout=120 --timeout-method=thread -n auto"
|
3
3
|
asyncio_default_fixture_loop_scope = "function"
|
4
4
|
python_files = [
|
5
5
|
"test_*.py",
|
@@ -120,6 +120,7 @@ exclude-deps = [
|
|
120
120
|
"pytest-asyncio",
|
121
121
|
"pytest-cov",
|
122
122
|
"pytest-mock",
|
123
|
+
"pytest-xdist",
|
123
124
|
"pdm",
|
124
125
|
"pyfiglet",
|
125
126
|
"pyyaml",
|
@@ -175,7 +176,7 @@ pythonPlatform = "Darwin"
|
|
175
176
|
|
176
177
|
[project]
|
177
178
|
name = "crackerjack"
|
178
|
-
version = "0.18.
|
179
|
+
version = "0.18.8"
|
179
180
|
description = "Default template for PDM package"
|
180
181
|
requires-python = ">=3.13"
|
181
182
|
readme = "README.md"
|
@@ -218,6 +219,7 @@ dependencies = [
|
|
218
219
|
"rich>=14.0.0",
|
219
220
|
"typer>=0.15.4",
|
220
221
|
"pytest-timeout>=2.4.0",
|
222
|
+
"pytest-xdist>=3.5.0",
|
221
223
|
]
|
222
224
|
authors = [
|
223
225
|
{ name = "lesleslie", email = "les@wedgwoodwebworks.com" },
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"""Pytest configuration file with hooks for detecting slow and hanging tests."""
|
2
|
+
|
3
|
+
import time
|
4
|
+
from pathlib import Path
|
5
|
+
from typing import Any
|
6
|
+
|
7
|
+
import pytest
|
8
|
+
|
9
|
+
|
10
|
+
@pytest.hookimpl(trylast=True)
|
11
|
+
def pytest_runtest_setup(item: Any) -> None:
|
12
|
+
item._start_time = time.time()
|
13
|
+
print(f"Starting test: {item.name}")
|
14
|
+
|
15
|
+
|
16
|
+
@pytest.hookimpl(trylast=True)
|
17
|
+
def pytest_runtest_teardown(item: Any) -> None:
|
18
|
+
if hasattr(item, "_start_time"):
|
19
|
+
duration = time.time() - item._start_time
|
20
|
+
if duration > 10:
|
21
|
+
print(f"SLOW TEST: {item.name} took {duration:.2f}s")
|
22
|
+
else:
|
23
|
+
print(f"Test completed: {item.name} in {duration:.2f}s")
|
24
|
+
|
25
|
+
|
26
|
+
@pytest.hookimpl(trylast=True)
|
27
|
+
def pytest_runtest_protocol(item: Any) -> None:
|
28
|
+
Path(".current_test").write_text(f"Current test: {item.name}")
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"""Tests for pytest timeout and parallel execution features."""
|
2
|
+
|
3
|
+
import time
|
4
|
+
|
5
|
+
import pytest
|
6
|
+
|
7
|
+
|
8
|
+
def test_normal_execution() -> None:
|
9
|
+
assert True
|
10
|
+
|
11
|
+
|
12
|
+
@pytest.mark.timeout(2)
|
13
|
+
def test_timeout_feature() -> None:
|
14
|
+
time.sleep(1)
|
15
|
+
assert True
|
16
|
+
|
17
|
+
|
18
|
+
@pytest.mark.xdist_group("group1")
|
19
|
+
def test_xdist_group1() -> None:
|
20
|
+
assert True
|
21
|
+
|
22
|
+
|
23
|
+
@pytest.mark.xdist_group("group1")
|
24
|
+
def test_xdist_group1_second() -> None:
|
25
|
+
assert True
|
26
|
+
|
27
|
+
|
28
|
+
@pytest.mark.xdist_group("group2")
|
29
|
+
def test_xdist_group2() -> None:
|
30
|
+
assert True
|
31
|
+
|
32
|
+
|
33
|
+
def test_slow_but_not_hanging() -> None:
|
34
|
+
time.sleep(12)
|
35
|
+
assert True
|
36
|
+
|
37
|
+
|
38
|
+
@pytest.mark.skip(reason="This test intentionally hangs to test timeout feature")
|
39
|
+
def test_hanging() -> None:
|
40
|
+
while True:
|
41
|
+
time.sleep(1)
|
Binary file
|
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
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.11/3256171999636029978
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.4/10355199064880463147
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.6/15140459877605758699
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.1.9/17041001205004563469
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.2/4070660268492669020
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.3/9818742842212983150
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.4/9818742842212983150
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.6/3557596832929915217
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.7/10386934055395314831
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.11.7/3557596832929915217
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.2.0/10047773857155985907
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.2.2/18053836298936336950
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.3.0/12548816621480535786
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.3.3/11081883392474770722
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.3.5/16311176246009842383
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.6.0/11982804814124138945
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.6.0/12055761203849489982
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
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.7.3/16061516852537040135
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.8.4/16354268377385700367
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.9.10/12813592349865671909
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.9.3/13948373885254993391
RENAMED
File without changes
|
{crackerjack-0.18.7 → crackerjack-0.18.8}/crackerjack/.ruff_cache/0.9.9/12813592349865671909
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
|
File without changes
|
File without changes
|
File without changes
|