schemathesis 4.0.23__py3-none-any.whl → 4.0.25__py3-none-any.whl
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.
- schemathesis/config/_error.py +7 -0
- schemathesis/config/schema.json +16 -2
- schemathesis/core/errors.py +1 -0
- schemathesis/core/loaders.py +3 -0
- schemathesis/generation/hypothesis/__init__.py +9 -0
- {schemathesis-4.0.23.dist-info → schemathesis-4.0.25.dist-info}/METADATA +1 -1
- {schemathesis-4.0.23.dist-info → schemathesis-4.0.25.dist-info}/RECORD +10 -10
- {schemathesis-4.0.23.dist-info → schemathesis-4.0.25.dist-info}/WHEEL +0 -0
- {schemathesis-4.0.23.dist-info → schemathesis-4.0.25.dist-info}/entry_points.txt +0 -0
- {schemathesis-4.0.23.dist-info → schemathesis-4.0.25.dist-info}/licenses/LICENSE +0 -0
schemathesis/config/_error.py
CHANGED
@@ -140,6 +140,13 @@ def _format_anyof_error(error: ValidationError) -> str:
|
|
140
140
|
f"Error in {section} section:\n At least one filter is required when defining [[operations]].\n\n"
|
141
141
|
"Please specify at least one include or exclude filter property (e.g., include-path, exclude-tag, etc.)."
|
142
142
|
)
|
143
|
+
elif list(error.schema_path) == ["properties", "workers", "anyOf"]:
|
144
|
+
return (
|
145
|
+
f"Invalid value for 'workers': {repr(error.instance)}\n\n"
|
146
|
+
f"Expected either:\n"
|
147
|
+
f" - A positive integer (e.g., workers = 4)\n"
|
148
|
+
f' - The string "auto" for automatic detection (workers = "auto")'
|
149
|
+
)
|
143
150
|
return error.message
|
144
151
|
|
145
152
|
|
schemathesis/config/schema.json
CHANGED
@@ -94,7 +94,14 @@
|
|
94
94
|
"type": "string"
|
95
95
|
},
|
96
96
|
"workers": {
|
97
|
-
"
|
97
|
+
"anyOf": [
|
98
|
+
{
|
99
|
+
"type": "integer"
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"const": "auto"
|
103
|
+
}
|
104
|
+
]
|
98
105
|
},
|
99
106
|
"wait-for-schema": {
|
100
107
|
"type": "number",
|
@@ -491,7 +498,14 @@
|
|
491
498
|
"type": "string"
|
492
499
|
},
|
493
500
|
"workers": {
|
494
|
-
"
|
501
|
+
"anyOf": [
|
502
|
+
{
|
503
|
+
"type": "integer"
|
504
|
+
},
|
505
|
+
{
|
506
|
+
"const": "auto"
|
507
|
+
}
|
508
|
+
]
|
495
509
|
},
|
496
510
|
"wait-for-schema": {
|
497
511
|
"type": "number",
|
schemathesis/core/errors.py
CHANGED
@@ -330,6 +330,7 @@ class LoaderErrorKind(str, enum.Enum):
|
|
330
330
|
CONNECTION_SSL = "connection_ssl"
|
331
331
|
CONNECTION_OTHER = "connection_other"
|
332
332
|
NETWORK_OTHER = "network_other"
|
333
|
+
INVALID_CERTIFICATE = "invalid_certificate"
|
333
334
|
|
334
335
|
# HTTP error codes
|
335
336
|
HTTP_SERVER_ERROR = "http_server_error"
|
schemathesis/core/loaders.py
CHANGED
@@ -67,6 +67,9 @@ def make_request(func: Callable[..., requests.Response], url: str, **kwargs: Any
|
|
67
67
|
return raise_for_status(response)
|
68
68
|
except requests.RequestException as exc:
|
69
69
|
handle_request_error(exc)
|
70
|
+
except OSError as exc:
|
71
|
+
# Possible with certificate errors
|
72
|
+
raise LoaderError(message=str(exc), kind=LoaderErrorKind.INVALID_CERTIFICATE, url=url, extras=[]) from None
|
70
73
|
|
71
74
|
|
72
75
|
WAIT_FOR_SCHEMA_INTERVAL = 0.05
|
@@ -7,6 +7,7 @@ def setup() -> None:
|
|
7
7
|
from hypothesis.internal.entropy import deterministic_PRNG
|
8
8
|
from hypothesis.internal.reflection import is_first_param_referenced_in_function
|
9
9
|
from hypothesis.strategies._internal import collections, core
|
10
|
+
from hypothesis.vendor import pretty
|
10
11
|
from hypothesis_jsonschema import _from_schema, _resolve
|
11
12
|
|
12
13
|
from schemathesis.core import INTERNAL_BUFFER_SIZE
|
@@ -26,6 +27,14 @@ def setup() -> None:
|
|
26
27
|
return is_first_param_referenced_in_function(f)
|
27
28
|
|
28
29
|
core.is_first_param_referenced_in_function = _is_first_param_referenced_in_function # type: ignore
|
30
|
+
|
31
|
+
class RepresentationPrinter(pretty.RepresentationPrinter):
|
32
|
+
def pretty(self, obj: object) -> None:
|
33
|
+
# This one takes way too much - in the coverage phase it may give >2 orders of magnitude improvement
|
34
|
+
# depending on the schema size (~300 seconds -> 4.5 seconds in one of the benchmarks)
|
35
|
+
return None
|
36
|
+
|
37
|
+
root_core.RepresentationPrinter = RepresentationPrinter # type: ignore
|
29
38
|
_resolve.deepcopy = deepclone # type: ignore
|
30
39
|
_from_schema.deepcopy = deepclone # type: ignore
|
31
40
|
root_core.BUFFER_SIZE = INTERNAL_BUFFER_SIZE # type: ignore
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: schemathesis
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.25
|
4
4
|
Summary: Property-based testing framework for Open API and GraphQL based apps
|
5
5
|
Project-URL: Documentation, https://schemathesis.readthedocs.io/en/stable/
|
6
6
|
Project-URL: Changelog, https://github.com/schemathesis/schemathesis/blob/master/CHANGELOG.md
|
@@ -33,7 +33,7 @@ schemathesis/config/_auth.py,sha256=83RLVPm97W2thbn-yi01Rt94YwOxLG_a5VoxhEfjUjs,
|
|
33
33
|
schemathesis/config/_checks.py,sha256=F0r16eSSiICvoiTUkNNOE2PH73EGd8bikoeZdME_3Yw,10763
|
34
34
|
schemathesis/config/_diff_base.py,sha256=-XqS6cTzZC5fplz8_2RSZHDMSAPJhBBIEP6H8wcgHmo,4221
|
35
35
|
schemathesis/config/_env.py,sha256=8XfIyrnGNQuCDnfG0lwmKRFbasRUjgeQGBAMupsmtOU,613
|
36
|
-
schemathesis/config/_error.py,sha256=
|
36
|
+
schemathesis/config/_error.py,sha256=jfv9chQ4NGoDYypszNGymr0zxXVo65yP0AWK1WVEPIM,5781
|
37
37
|
schemathesis/config/_generation.py,sha256=giWs4z17z9nRe_9Z3mAZ3LEoyh4hkcJnlAA6LSy6iEo,5210
|
38
38
|
schemathesis/config/_health_check.py,sha256=zC9inla5ibMBlEy5WyM4_TME7ju_KH3Bwfo21RI3Gks,561
|
39
39
|
schemathesis/config/_operations.py,sha256=2M36b4MMoFtaaFpe9yG-aWRqh0Qm1dpdk5M0V23X2yA,12129
|
@@ -45,18 +45,18 @@ schemathesis/config/_rate_limit.py,sha256=ekEW-jP_Ichk_O6hYpj-h2TTTKfp7Fm0nyFUbv
|
|
45
45
|
schemathesis/config/_report.py,sha256=ZECDpaCY4WWHD5UbjvgZoSjLz-rlTvfd5Ivzdgzqf2I,3891
|
46
46
|
schemathesis/config/_validator.py,sha256=IcE8geFZ0ZwR18rkIRs25i7pTl7Z84XbjYGUB-mqReU,258
|
47
47
|
schemathesis/config/_warnings.py,sha256=sI0VZcTj3dOnphhBwYwU_KTagxr89HGWTtQ99HcY84k,772
|
48
|
-
schemathesis/config/schema.json,sha256=
|
48
|
+
schemathesis/config/schema.json,sha256=AzWZmZaAuAk4g7-EL_-LwGux3VScg81epWdPfz-kqG0,19127
|
49
49
|
schemathesis/core/__init__.py,sha256=j862XBH5dXhxsrDg9mE7n4cSSfol0EHdY0ru1d27tCc,1917
|
50
50
|
schemathesis/core/compat.py,sha256=9BWCrFoqN2sJIaiht_anxe8kLjYMR7t0iiOkXqLRUZ8,1058
|
51
51
|
schemathesis/core/control.py,sha256=IzwIc8HIAEMtZWW0Q0iXI7T1niBpjvcLlbuwOSmy5O8,130
|
52
52
|
schemathesis/core/curl.py,sha256=yuaCe_zHLGwUjEeloQi6W3tOA3cGdnHDNI17-5jia0o,1723
|
53
53
|
schemathesis/core/deserialization.py,sha256=qjXUPaz_mc1OSgXzTUSkC8tuVR8wgVQtb9g3CcAF6D0,2951
|
54
|
-
schemathesis/core/errors.py,sha256=
|
54
|
+
schemathesis/core/errors.py,sha256=pwiyGhX7tId88Toe2H4ZYsCDc_OvUJtW8Wv-xDv2UD4,16361
|
55
55
|
schemathesis/core/failures.py,sha256=MYyRnom-XeUEuBmq2ffdz34xhxmpSHWaQunfHtliVsY,8932
|
56
56
|
schemathesis/core/fs.py,sha256=ItQT0_cVwjDdJX9IiI7EnU75NI2H3_DCEyyUjzg_BgI,472
|
57
57
|
schemathesis/core/hooks.py,sha256=qhbkkRSf8URJ4LKv2wmKRINKpquUOgxQzWBHKWRWo3Q,475
|
58
58
|
schemathesis/core/lazy_import.py,sha256=aMhWYgbU2JOltyWBb32vnWBb6kykOghucEzI_F70yVE,470
|
59
|
-
schemathesis/core/loaders.py,sha256=
|
59
|
+
schemathesis/core/loaders.py,sha256=04WRkiWfWPH4xjgi0nMO1NyjGw8zvraIq6PqMqCq1c4,3590
|
60
60
|
schemathesis/core/marks.py,sha256=SH7jsVuNRJjx2gZN9Ze5MY01u7FJiHeO0iruzKi5rm4,2135
|
61
61
|
schemathesis/core/media_types.py,sha256=ThdAikBttdRD1RB9-83rMmtG_z-BdW8xidUxzhgdUqI,2168
|
62
62
|
schemathesis/core/rate_limit.py,sha256=7tg9Znk11erTfw8-ANutjEmu7hbfUHZx_iEdkoaP174,1757
|
@@ -90,7 +90,7 @@ schemathesis/generation/meta.py,sha256=adkoMuCfzSjHJ9ZDocQn0GnVldSCkLL3eVR5A_jaf
|
|
90
90
|
schemathesis/generation/metrics.py,sha256=cZU5HdeAMcLFEDnTbNE56NuNq4P0N4ew-g1NEz5-kt4,2836
|
91
91
|
schemathesis/generation/modes.py,sha256=Q1fhjWr3zxabU5qdtLvKfpMFZJAwlW9pnxgenjeXTyU,481
|
92
92
|
schemathesis/generation/overrides.py,sha256=OBWqDQPreiliaf2M-oyXppVKHoJkCRzxtwSJx1b6AFw,3759
|
93
|
-
schemathesis/generation/hypothesis/__init__.py,sha256=
|
93
|
+
schemathesis/generation/hypothesis/__init__.py,sha256=jK3G4i0SdcyhqwPQg91RH_yg437lSY-smeIQ-wZLWPc,1959
|
94
94
|
schemathesis/generation/hypothesis/builder.py,sha256=f_5VsqeHKP-07pJZ0CPpW6YSxs9qUEseanAaxwOwdm4,34970
|
95
95
|
schemathesis/generation/hypothesis/examples.py,sha256=6eGaKUEC3elmKsaqfKj1sLvM8EHc-PWT4NRBq4NI0Rs,1409
|
96
96
|
schemathesis/generation/hypothesis/given.py,sha256=sTZR1of6XaHAPWtHx2_WLlZ50M8D5Rjux0GmWkWjDq4,2337
|
@@ -157,8 +157,8 @@ schemathesis/transport/prepare.py,sha256=erYXRaxpQokIDzaIuvt_csHcw72iHfCyNq8VNEz
|
|
157
157
|
schemathesis/transport/requests.py,sha256=46aplzhSmBupegPNMawma-iJWCegWkEd6mzdWLTpgM4,10742
|
158
158
|
schemathesis/transport/serialization.py,sha256=igUXKZ_VJ9gV7P0TUc5PDQBJXl_s0kK9T3ljGWWvo6E,10339
|
159
159
|
schemathesis/transport/wsgi.py,sha256=KoAfvu6RJtzyj24VGB8e-Iaa9smpgXJ3VsM8EgAz2tc,6152
|
160
|
-
schemathesis-4.0.
|
161
|
-
schemathesis-4.0.
|
162
|
-
schemathesis-4.0.
|
163
|
-
schemathesis-4.0.
|
164
|
-
schemathesis-4.0.
|
160
|
+
schemathesis-4.0.25.dist-info/METADATA,sha256=fDOwqjEGej0gv9GwwXe4xzk2FMgebaeSxAdpxOw3-jo,8472
|
161
|
+
schemathesis-4.0.25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
162
|
+
schemathesis-4.0.25.dist-info/entry_points.txt,sha256=hiK3un-xfgPdwj9uj16YVDtTNpO128bmk0U82SMv8ZQ,152
|
163
|
+
schemathesis-4.0.25.dist-info/licenses/LICENSE,sha256=2Ve4J8v5jMQAWrT7r1nf3bI8Vflk3rZVQefiF2zpxwg,1121
|
164
|
+
schemathesis-4.0.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|