provide-testkit 0.0.0.dev3__tar.gz → 0.0.0.dev6__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.
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/PKG-INFO +2 -2
- provide_testkit-0.0.0.dev6/VERSION +1 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/pyproject.toml +1 -3
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/__init__.py +101 -133
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/cli.py +5 -6
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide_testkit.egg-info/PKG-INFO +2 -2
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide_testkit.egg-info/requires.txt +1 -1
- provide_testkit-0.0.0.dev3/VERSION +0 -1
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/README.md +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/setup.cfg +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/archive/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/archive/fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/common/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/common/fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/crypto.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/environment.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/file/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/file/content_fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/file/directory_fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/file/fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/file/special_fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/harness.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/hub.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/logger/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/logger/hooks.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/logger/reset.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/main.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/mocking/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/mocking/fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/process/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/process/async_fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/process/fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/process/subprocess_fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/artifacts.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/base.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/cli.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/complexity/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/complexity/analyzer.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/complexity/fixture.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/coverage/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/coverage/fixture.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/coverage/reporter.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/coverage/tracker.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/decorators.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/documentation/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/documentation/checker.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/documentation/fixture.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/profiling/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/profiling/fixture.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/profiling/profiler.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/report.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/runner.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/security/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/security/fixture.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/security/scanner.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/streams.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/threading/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/threading/basic_fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/threading/data_fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/threading/execution_fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/threading/fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/threading/sync_fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/time/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/time/fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/transport/__init__.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/transport/fixtures.py +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide_testkit.egg-info/SOURCES.txt +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide_testkit.egg-info/dependency_links.txt +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide_testkit.egg-info/entry_points.txt +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide_testkit.egg-info/top_level.txt +0 -0
- {provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/tests/test_placeholder.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: provide-testkit
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev6
|
|
4
4
|
Summary: Testing utilities and fixtures for the provide ecosystem.
|
|
5
5
|
Author-email: Tim Perkins <code@tim.life>
|
|
6
6
|
Maintainer-email: "provide.io" <code@provide.io>
|
|
@@ -23,7 +23,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
23
23
|
Classifier: Typing :: Typed
|
|
24
24
|
Requires-Python: >=3.11
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
|
-
Requires-Dist: provide-foundation
|
|
26
|
+
Requires-Dist: provide-foundation
|
|
27
27
|
Requires-Dist: click>=8.1.7
|
|
28
28
|
Requires-Dist: pytest>=8.3.5
|
|
29
29
|
Requires-Dist: pytest-asyncio>=0.26.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.0-dev.6
|
|
@@ -31,7 +31,7 @@ classifiers = [
|
|
|
31
31
|
"Typing :: Typed",
|
|
32
32
|
]
|
|
33
33
|
dependencies = [
|
|
34
|
-
"provide-foundation
|
|
34
|
+
"provide-foundation",
|
|
35
35
|
"click>=8.1.7", # For CLI testing utilities
|
|
36
36
|
# Core testing - use highest versions across ecosystem
|
|
37
37
|
"pytest>=8.3.5",
|
|
@@ -212,8 +212,6 @@ dev-dependencies = [
|
|
|
212
212
|
"provide-testkit[quality]",
|
|
213
213
|
]
|
|
214
214
|
|
|
215
|
-
[tool.uv.sources]
|
|
216
|
-
provide-foundation = { workspace = true }
|
|
217
215
|
|
|
218
216
|
[tool.ruff]
|
|
219
217
|
target-version = "py311"
|
|
@@ -12,73 +12,38 @@ Note: Testing information is displayed via pytest hooks in conftest.py
|
|
|
12
12
|
|
|
13
13
|
from typing import Any
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def __getattr__(name: str) -> Any:
|
|
18
|
-
"""Lazy import testing utilities only when accessed."""
|
|
19
|
-
|
|
15
|
+
# Mapping of attribute names to their modules
|
|
16
|
+
_LAZY_IMPORTS = {
|
|
20
17
|
# CLI testing utilities
|
|
21
|
-
|
|
18
|
+
"cli": [
|
|
22
19
|
"MockContext",
|
|
23
20
|
"isolated_cli_runner",
|
|
24
21
|
"temp_config_file",
|
|
25
22
|
"create_test_cli",
|
|
26
23
|
"CliTestCase",
|
|
27
24
|
"click_testing_mode",
|
|
28
|
-
]
|
|
29
|
-
import provide.testkit.cli as cli_module
|
|
30
|
-
|
|
31
|
-
return getattr(cli_module, name)
|
|
32
|
-
|
|
25
|
+
],
|
|
33
26
|
# Logger testing utilities
|
|
34
|
-
|
|
27
|
+
"logger": [
|
|
35
28
|
"reset_foundation_setup_for_testing",
|
|
36
29
|
"reset_foundation_state",
|
|
37
30
|
"mock_logger",
|
|
38
31
|
"mock_logger_factory",
|
|
39
|
-
# New hook utilities
|
|
40
32
|
"DEFAULT_NOISY_LOGGERS",
|
|
41
33
|
"get_noisy_loggers",
|
|
42
34
|
"get_log_level_for_noisy_loggers",
|
|
43
35
|
"pytest_runtest_setup",
|
|
44
36
|
"suppress_loggers",
|
|
45
|
-
]
|
|
46
|
-
import provide.testkit.logger as logger_module
|
|
47
|
-
|
|
48
|
-
return getattr(logger_module, name)
|
|
49
|
-
|
|
37
|
+
],
|
|
50
38
|
# Stream testing utilities
|
|
51
|
-
|
|
52
|
-
import provide.testkit.streams as streams_module
|
|
53
|
-
|
|
54
|
-
return getattr(streams_module, name)
|
|
55
|
-
|
|
39
|
+
"streams": ["set_log_stream_for_testing"],
|
|
56
40
|
# Fixture utilities
|
|
57
|
-
|
|
41
|
+
"fixtures": [
|
|
58
42
|
"captured_stderr_for_foundation",
|
|
59
43
|
"setup_foundation_telemetry_for_test",
|
|
60
|
-
]
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return getattr(fixtures_module, name)
|
|
64
|
-
|
|
65
|
-
# Import submodules directly
|
|
66
|
-
elif name in [
|
|
67
|
-
"archive",
|
|
68
|
-
"common",
|
|
69
|
-
"file",
|
|
70
|
-
"process",
|
|
71
|
-
"transport",
|
|
72
|
-
"mocking",
|
|
73
|
-
"time",
|
|
74
|
-
"threading",
|
|
75
|
-
]:
|
|
76
|
-
import importlib
|
|
77
|
-
|
|
78
|
-
return importlib.import_module(f"provide.testkit.{name}")
|
|
79
|
-
|
|
80
|
-
# File testing utilities (backward compatibility)
|
|
81
|
-
elif name in [
|
|
44
|
+
],
|
|
45
|
+
# File testing utilities
|
|
46
|
+
"file.fixtures": [
|
|
82
47
|
"temp_directory",
|
|
83
48
|
"test_files_structure",
|
|
84
49
|
"temp_file",
|
|
@@ -86,13 +51,9 @@ def __getattr__(name: str) -> Any:
|
|
|
86
51
|
"nested_directory_structure",
|
|
87
52
|
"empty_directory",
|
|
88
53
|
"readonly_file",
|
|
89
|
-
]
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
return getattr(file_module, name)
|
|
93
|
-
|
|
94
|
-
# Process/async testing utilities (backward compatibility)
|
|
95
|
-
elif name in [
|
|
54
|
+
],
|
|
55
|
+
# Process/async testing utilities
|
|
56
|
+
"process.fixtures": [
|
|
96
57
|
"clean_event_loop",
|
|
97
58
|
"async_timeout",
|
|
98
59
|
"mock_async_process",
|
|
@@ -103,13 +64,9 @@ def __getattr__(name: str) -> Any:
|
|
|
103
64
|
"async_queue",
|
|
104
65
|
"async_lock",
|
|
105
66
|
"mock_async_sleep",
|
|
106
|
-
]
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return getattr(process_module, name)
|
|
110
|
-
|
|
111
|
-
# Common mock utilities (backward compatibility)
|
|
112
|
-
elif name in [
|
|
67
|
+
],
|
|
68
|
+
# Common mock utilities
|
|
69
|
+
"common.fixtures": [
|
|
113
70
|
"mock_http_config",
|
|
114
71
|
"mock_telemetry_config",
|
|
115
72
|
"mock_config_source",
|
|
@@ -120,13 +77,9 @@ def __getattr__(name: str) -> Any:
|
|
|
120
77
|
"mock_database",
|
|
121
78
|
"mock_file_system",
|
|
122
79
|
"mock_subprocess",
|
|
123
|
-
]
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return getattr(common_module, name)
|
|
127
|
-
|
|
128
|
-
# Transport/network testing utilities (backward compatibility)
|
|
129
|
-
elif name in [
|
|
80
|
+
],
|
|
81
|
+
# Transport/network testing utilities
|
|
82
|
+
"transport.fixtures": [
|
|
130
83
|
"free_port",
|
|
131
84
|
"mock_server",
|
|
132
85
|
"httpx_mock_responses",
|
|
@@ -136,26 +89,18 @@ def __getattr__(name: str) -> Any:
|
|
|
136
89
|
"mock_ssl_context",
|
|
137
90
|
"network_timeout",
|
|
138
91
|
"mock_http_headers",
|
|
139
|
-
]
|
|
140
|
-
import provide.testkit.transport.fixtures as transport_module
|
|
141
|
-
|
|
142
|
-
return getattr(transport_module, name)
|
|
143
|
-
|
|
92
|
+
],
|
|
144
93
|
# Archive testing utilities
|
|
145
|
-
|
|
94
|
+
"archive.fixtures": [
|
|
146
95
|
"archive_test_content",
|
|
147
96
|
"large_file_for_compression",
|
|
148
97
|
"multi_format_archives",
|
|
149
98
|
"archive_with_permissions",
|
|
150
99
|
"corrupted_archives",
|
|
151
100
|
"archive_stress_test_files",
|
|
152
|
-
]
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
return getattr(archive_module, name)
|
|
156
|
-
|
|
157
|
-
# Crypto fixtures (many fixtures)
|
|
158
|
-
elif name in [
|
|
101
|
+
],
|
|
102
|
+
# Crypto fixtures
|
|
103
|
+
"crypto": [
|
|
159
104
|
"client_cert",
|
|
160
105
|
"server_cert",
|
|
161
106
|
"ca_cert",
|
|
@@ -171,78 +116,101 @@ def __getattr__(name: str) -> Any:
|
|
|
171
116
|
"cert_with_utf8_bom",
|
|
172
117
|
"cert_with_extra_whitespace",
|
|
173
118
|
"external_ca_pem",
|
|
174
|
-
]
|
|
175
|
-
import provide.testkit.crypto as crypto_module
|
|
176
|
-
|
|
177
|
-
return getattr(crypto_module, name)
|
|
178
|
-
|
|
119
|
+
],
|
|
179
120
|
# Hub fixtures
|
|
180
|
-
|
|
181
|
-
import provide.testkit.hub as hub_module
|
|
182
|
-
|
|
183
|
-
return getattr(hub_module, name)
|
|
184
|
-
|
|
121
|
+
"hub": ["default_container_directory"],
|
|
185
122
|
# Environment utilities
|
|
186
|
-
|
|
123
|
+
"environment": [
|
|
187
124
|
"TestEnvironment",
|
|
188
125
|
"get_example_dir",
|
|
189
126
|
"add_src_to_path",
|
|
190
127
|
"reset_test_environment",
|
|
191
|
-
]
|
|
192
|
-
|
|
128
|
+
],
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
# Submodules that can be imported directly
|
|
132
|
+
_DIRECT_SUBMODULES = [
|
|
133
|
+
"archive",
|
|
134
|
+
"common",
|
|
135
|
+
"file",
|
|
136
|
+
"process",
|
|
137
|
+
"transport",
|
|
138
|
+
"mocking",
|
|
139
|
+
"time",
|
|
140
|
+
"threading",
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _import_from_module(module_path: str, name: str) -> Any:
|
|
145
|
+
"""Import an attribute from a specific module."""
|
|
146
|
+
import importlib
|
|
147
|
+
|
|
148
|
+
module = importlib.import_module(f"provide.testkit.{module_path}")
|
|
149
|
+
return getattr(module, name)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def _find_attribute_module(name: str) -> str | None:
|
|
153
|
+
"""Find which module contains the given attribute name."""
|
|
154
|
+
for module_path, attributes in _LAZY_IMPORTS.items():
|
|
155
|
+
if name in attributes:
|
|
156
|
+
return module_path
|
|
157
|
+
return None
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
# Lazy imports to avoid importing testing utilities in production
|
|
161
|
+
def __getattr__(name: str) -> Any:
|
|
162
|
+
"""Lazy import testing utilities only when accessed."""
|
|
163
|
+
# Check if it's a direct submodule
|
|
164
|
+
if name in _DIRECT_SUBMODULES:
|
|
165
|
+
import importlib
|
|
193
166
|
|
|
194
|
-
return
|
|
167
|
+
return importlib.import_module(f"provide.testkit.{name}")
|
|
195
168
|
|
|
196
|
-
|
|
197
|
-
|
|
169
|
+
# Find which module contains this attribute
|
|
170
|
+
module_path = _find_attribute_module(name)
|
|
171
|
+
if module_path:
|
|
172
|
+
return _import_from_module(module_path, name)
|
|
173
|
+
|
|
174
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
198
175
|
|
|
199
176
|
|
|
200
177
|
# Public API - these will be available for import but loaded lazily
|
|
201
178
|
__all__ = [
|
|
202
|
-
|
|
203
|
-
"
|
|
204
|
-
# CLI testing
|
|
179
|
+
"DEFAULT_NOISY_LOGGERS",
|
|
180
|
+
"CliTestCase",
|
|
205
181
|
"MockContext",
|
|
206
|
-
"
|
|
207
|
-
"
|
|
182
|
+
"TestEnvironment",
|
|
183
|
+
"_is_testing_context",
|
|
184
|
+
"add_src_to_path",
|
|
185
|
+
"ca_cert",
|
|
186
|
+
"captured_stderr_for_foundation",
|
|
187
|
+
"cert_with_extra_whitespace",
|
|
188
|
+
"cert_with_utf8_bom",
|
|
189
|
+
"cert_with_windows_line_endings",
|
|
190
|
+
"client_cert",
|
|
208
191
|
"create_test_cli",
|
|
192
|
+
"default_container_directory",
|
|
193
|
+
"empty_cert",
|
|
194
|
+
"external_ca_pem",
|
|
195
|
+
"get_example_dir",
|
|
196
|
+
"get_log_level_for_noisy_loggers",
|
|
197
|
+
"get_noisy_loggers",
|
|
198
|
+
"invalid_cert_pem",
|
|
199
|
+
"invalid_key_pem",
|
|
200
|
+
"isolated_cli_runner",
|
|
201
|
+
"malformed_cert_pem",
|
|
209
202
|
"mock_logger",
|
|
210
|
-
"
|
|
211
|
-
# Logger testing
|
|
203
|
+
"pytest_runtest_setup",
|
|
212
204
|
"reset_foundation_setup_for_testing",
|
|
213
205
|
"reset_foundation_state",
|
|
214
|
-
|
|
215
|
-
"
|
|
216
|
-
"get_noisy_loggers",
|
|
217
|
-
"get_log_level_for_noisy_loggers",
|
|
218
|
-
"pytest_runtest_setup",
|
|
219
|
-
"suppress_loggers",
|
|
220
|
-
# Stream testing
|
|
206
|
+
"reset_test_environment",
|
|
207
|
+
"server_cert",
|
|
221
208
|
"set_log_stream_for_testing",
|
|
222
|
-
# Common fixtures
|
|
223
|
-
"captured_stderr_for_foundation",
|
|
224
209
|
"setup_foundation_telemetry_for_test",
|
|
225
|
-
|
|
226
|
-
"
|
|
227
|
-
"server_cert",
|
|
228
|
-
"ca_cert",
|
|
229
|
-
"valid_cert_pem",
|
|
230
|
-
"valid_key_pem",
|
|
231
|
-
"invalid_cert_pem",
|
|
232
|
-
"invalid_key_pem",
|
|
233
|
-
"malformed_cert_pem",
|
|
234
|
-
"empty_cert",
|
|
210
|
+
"suppress_loggers",
|
|
211
|
+
"temp_config_file",
|
|
235
212
|
"temporary_cert_file",
|
|
236
213
|
"temporary_key_file",
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"cert_with_extra_whitespace",
|
|
240
|
-
"external_ca_pem",
|
|
241
|
-
# Hub fixtures
|
|
242
|
-
"default_container_directory",
|
|
243
|
-
# Environment utilities
|
|
244
|
-
"TestEnvironment",
|
|
245
|
-
"get_example_dir",
|
|
246
|
-
"add_src_to_path",
|
|
247
|
-
"reset_test_environment",
|
|
214
|
+
"valid_cert_pem",
|
|
215
|
+
"valid_key_pem",
|
|
248
216
|
]
|
|
@@ -95,9 +95,8 @@ def temp_config_file(
|
|
|
95
95
|
"""
|
|
96
96
|
suffix = f".{format}"
|
|
97
97
|
|
|
98
|
-
with foundation_temp_file(suffix=suffix, text=True, cleanup=False) as config_path:
|
|
99
|
-
|
|
100
|
-
if isinstance(content, dict):
|
|
98
|
+
with foundation_temp_file(suffix=suffix, text=True, cleanup=False) as config_path, Path(config_path).open("w") as f:
|
|
99
|
+
if isinstance(content, dict):
|
|
101
100
|
if format == "json":
|
|
102
101
|
json.dump(content, f, indent=2)
|
|
103
102
|
elif format == "toml":
|
|
@@ -122,8 +121,8 @@ def temp_config_file(
|
|
|
122
121
|
import yaml
|
|
123
122
|
|
|
124
123
|
yaml.safe_dump(content, f)
|
|
125
|
-
except ImportError:
|
|
126
|
-
raise ImportError("PyYAML required for YAML testing")
|
|
124
|
+
except ImportError as e:
|
|
125
|
+
raise ImportError("PyYAML required for YAML testing") from e
|
|
127
126
|
else:
|
|
128
127
|
f.write(content)
|
|
129
128
|
|
|
@@ -196,7 +195,7 @@ class CliTestCase:
|
|
|
196
195
|
try:
|
|
197
196
|
output = json.loads(result.output)
|
|
198
197
|
except json.JSONDecodeError as e:
|
|
199
|
-
raise AssertionError(f"Output is not valid JSON: {e}\n{result.output}")
|
|
198
|
+
raise AssertionError(f"Output is not valid JSON: {e}\n{result.output}") from e
|
|
200
199
|
|
|
201
200
|
for key, value in expected.items():
|
|
202
201
|
assert key in output, f"Key '{key}' not in output"
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide_testkit.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: provide-testkit
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev6
|
|
4
4
|
Summary: Testing utilities and fixtures for the provide ecosystem.
|
|
5
5
|
Author-email: Tim Perkins <code@tim.life>
|
|
6
6
|
Maintainer-email: "provide.io" <code@provide.io>
|
|
@@ -23,7 +23,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
23
23
|
Classifier: Typing :: Typed
|
|
24
24
|
Requires-Python: >=3.11
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
|
-
Requires-Dist: provide-foundation
|
|
26
|
+
Requires-Dist: provide-foundation
|
|
27
27
|
Requires-Dist: click>=8.1.7
|
|
28
28
|
Requires-Dist: pytest>=8.3.5
|
|
29
29
|
Requires-Dist: pytest-asyncio>=0.26.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.0.0-dev.3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/archive/__init__.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/archive/fixtures.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/common/__init__.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/common/fixtures.py
RENAMED
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/environment.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/file/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/file/fixtures.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/logger/__init__.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/logger/hooks.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/logger/reset.py
RENAMED
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/mocking/__init__.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/mocking/fixtures.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/process/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/process/fixtures.py
RENAMED
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/__init__.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/artifacts.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/base.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/cli.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
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/report.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/quality/runner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/threading/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/threading/fixtures.py
RENAMED
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/time/__init__.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/time/fixtures.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/transport/__init__.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide/testkit/transport/fixtures.py
RENAMED
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide_testkit.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{provide_testkit-0.0.0.dev3 → provide_testkit-0.0.0.dev6}/src/provide_testkit.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|