schemathesis 4.0.24__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.
@@ -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
 
@@ -94,7 +94,14 @@
94
94
  "type": "string"
95
95
  },
96
96
  "workers": {
97
- "type": "integer"
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
- "type": "integer"
501
+ "anyOf": [
502
+ {
503
+ "type": "integer"
504
+ },
505
+ {
506
+ "const": "auto"
507
+ }
508
+ ]
495
509
  },
496
510
  "wait-for-schema": {
497
511
  "type": "number",
@@ -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.24
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=TxuuqQ1olwJc7P7ssfxXb1dB_Xn5uVsoazjvYvRxrxA,5437
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,7 +45,7 @@ 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=wC1qe9M_fXotfmlBOmW_FCTRw9K5YC814-PipMGKllE,18907
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
@@ -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=76QYchbfeA-A_G_bP6_BkG5JO9SxIIP1yNRBZa06RvE,1495
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.24.dist-info/METADATA,sha256=QwSbcsUU-AKUCztu8bJ672YiCaXN7VMvx8sVkbKsuIo,8472
161
- schemathesis-4.0.24.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
162
- schemathesis-4.0.24.dist-info/entry_points.txt,sha256=hiK3un-xfgPdwj9uj16YVDtTNpO128bmk0U82SMv8ZQ,152
163
- schemathesis-4.0.24.dist-info/licenses/LICENSE,sha256=2Ve4J8v5jMQAWrT7r1nf3bI8Vflk3rZVQefiF2zpxwg,1121
164
- schemathesis-4.0.24.dist-info/RECORD,,
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,,