schemathesis 3.38.8__py3-none-any.whl → 3.38.9__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.
@@ -462,7 +462,10 @@ def _iter_coverage_cases(
462
462
  )
463
463
  if DataGenerationMethod.negative in data_generation_methods:
464
464
  subschema = _combination_schema(combo, required, parameter_set)
465
- yield from _yield_negative(subschema, location, container_name)
465
+ for case in _yield_negative(subschema, location, container_name):
466
+ # Already generated in one of the blocks above
467
+ if location != "path" and not case.meta.description.startswith("Missing required property"):
468
+ yield case
466
469
 
467
470
  # 3. Generate one combination for each size from 2 to N-1 of optional parameters
468
471
  if len(optional) > 1 and DataGenerationMethod.positive in data_generation_methods:
@@ -760,7 +760,7 @@ def _negative_enum(
760
760
  ctx: CoverageContext, value: list, seen: set[Any | tuple[type, str]]
761
761
  ) -> Generator[GeneratedValue, None, None]:
762
762
  def is_not_in_value(x: Any) -> bool:
763
- if x in value:
763
+ if x in value or not ctx.is_valid_for_location(x):
764
764
  return False
765
765
  _hashed = _to_hashable_key(x)
766
766
  return _hashed not in seen
@@ -829,9 +829,9 @@ def _negative_pattern(
829
829
  return
830
830
  yield NegativeValue(
831
831
  ctx.generate_from(
832
- st.text(min_size=min_length or 0, max_size=max_length).filter(
833
- partial(_not_matching_pattern, pattern=compiled)
834
- )
832
+ st.text(min_size=min_length or 0, max_size=max_length)
833
+ .filter(partial(_not_matching_pattern, pattern=compiled))
834
+ .filter(ctx.is_valid_for_location)
835
835
  ),
836
836
  description=f"Value not matching the '{pattern}' pattern",
837
837
  location=ctx.current_path,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: schemathesis
3
- Version: 3.38.8
3
+ Version: 3.38.9
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://schemathesis.readthedocs.io/en/stable/changelog.html
@@ -1,7 +1,7 @@
1
1
  schemathesis/__init__.py,sha256=UW2Bq8hDDkcBeAAA7PzpBFXkOOxkmHox-mfQwzHDjL0,1914
2
2
  schemathesis/_compat.py,sha256=y4RZd59i2NCnZ91VQhnKeMn_8t3SgvLOk2Xm8nymUHY,1837
3
3
  schemathesis/_dependency_versions.py,sha256=pjEkkGAfOQJYNb-9UOo84V8nj_lKHr_TGDVdFwY2UU0,816
4
- schemathesis/_hypothesis.py,sha256=ykQfiCkqguKcGVekVD8rMlTVOHT6BcURUa-0vMwT1HE,24044
4
+ schemathesis/_hypothesis.py,sha256=PsmomVk_mXZaqhOZJh5qftYSJ7qJs3wwBTSITiBXvT0,24273
5
5
  schemathesis/_lazy_import.py,sha256=aMhWYgbU2JOltyWBb32vnWBb6kykOghucEzI_F70yVE,470
6
6
  schemathesis/_override.py,sha256=TAjYB3eJQmlw9K_xiR9ptt9Wj7if4U7UFlUhGjpBAoM,1625
7
7
  schemathesis/_patches.py,sha256=Hsbpn4UVeXUQD2Kllrbq01CSWsTYENWa0VJTyhX5C2k,895
@@ -61,7 +61,7 @@ schemathesis/fixups/utf8_bom.py,sha256=lWT9RNmJG8i-l5AXIpaCT3qCPUwRgzXPW3eoOjmZE
61
61
  schemathesis/generation/__init__.py,sha256=29Zys_tD6kfngaC4zHeC6TOBZQcmo7CWm7KDSYsHStQ,1581
62
62
  schemathesis/generation/_hypothesis.py,sha256=74fzLPHugZgMQXerWYFAMqCAjtAXz5E4gek7Gnkhli4,1756
63
63
  schemathesis/generation/_methods.py,sha256=r8oVlJ71_gXcnEhU-byw2E0R2RswQQFm8U7yGErSqbw,1204
64
- schemathesis/generation/coverage.py,sha256=VUUhzD-X-nCDYqu-nxqiAAYKJMoa2MgzvGsa7x2xUmI,39177
64
+ schemathesis/generation/coverage.py,sha256=XgT1yX6iy__qEXN3lFs0PYZkFwXFHAgJf7ow3nmjcDc,39243
65
65
  schemathesis/internal/__init__.py,sha256=93HcdG3LF0BbQKbCteOsFMa1w6nXl8yTmx87QLNJOik,161
66
66
  schemathesis/internal/checks.py,sha256=EI5EjN_PI9QWNwJlsnUKjC6B1r0arRdpqniVZT-N0mE,2672
67
67
  schemathesis/internal/copy.py,sha256=DcL56z-d69kKR_5u8mlHvjSL1UTyUKNMAwexrwHFY1s,1031
@@ -153,8 +153,8 @@ schemathesis/transports/auth.py,sha256=urSTO9zgFO1qU69xvnKHPFQV0SlJL3d7_Ojl0tLnZ
153
153
  schemathesis/transports/content_types.py,sha256=MiKOm-Hy5i75hrROPdpiBZPOTDzOwlCdnthJD12AJzI,2187
154
154
  schemathesis/transports/headers.py,sha256=hr_AIDOfUxsJxpHfemIZ_uNG3_vzS_ZeMEKmZjbYiBE,990
155
155
  schemathesis/transports/responses.py,sha256=OFD4ZLqwEFpo7F9vaP_SVgjhxAqatxIj38FS4XVq8Qs,1680
156
- schemathesis-3.38.8.dist-info/METADATA,sha256=640ItX9m5YtdbKoT_P64ZVwFWnMtp2a7wrJN6G9XUpM,12923
157
- schemathesis-3.38.8.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
158
- schemathesis-3.38.8.dist-info/entry_points.txt,sha256=VHyLcOG7co0nOeuk8WjgpRETk5P1E2iCLrn26Zkn5uk,158
159
- schemathesis-3.38.8.dist-info/licenses/LICENSE,sha256=PsPYgrDhZ7g9uwihJXNG-XVb55wj2uYhkl2DD8oAzY0,1103
160
- schemathesis-3.38.8.dist-info/RECORD,,
156
+ schemathesis-3.38.9.dist-info/METADATA,sha256=c8_79jrn5P4jA6wzGq1UDK-LdZ74GyVDXzFajk4U6rc,12923
157
+ schemathesis-3.38.9.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
158
+ schemathesis-3.38.9.dist-info/entry_points.txt,sha256=VHyLcOG7co0nOeuk8WjgpRETk5P1E2iCLrn26Zkn5uk,158
159
+ schemathesis-3.38.9.dist-info/licenses/LICENSE,sha256=PsPYgrDhZ7g9uwihJXNG-XVb55wj2uYhkl2DD8oAzY0,1103
160
+ schemathesis-3.38.9.dist-info/RECORD,,