assertpy 2.35.0__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.
Files changed (63) hide show
  1. assertpy/__init__.py +87 -0
  2. assertpy/_clustering.py +511 -0
  3. assertpy/_dangling.py +505 -0
  4. assertpy/_engine/__init__.py +1 -0
  5. assertpy/_engine/_builder_check_typing.py +1365 -0
  6. assertpy/_engine/_capable_typing.py +772 -0
  7. assertpy/_engine/_check_typing.py +753 -0
  8. assertpy/_engine/_compare.py +983 -0
  9. assertpy/_engine/_compat.py +38 -0
  10. assertpy/_engine/_contract.py +1926 -0
  11. assertpy/_engine/_diff.py +1058 -0
  12. assertpy/_engine/_equality.py +843 -0
  13. assertpy/_engine/_introspection.py +729 -0
  14. assertpy/_engine/_membership.py +522 -0
  15. assertpy/_engine/_mixin_base.py +258 -0
  16. assertpy/_engine/_negated_typing.py +2176 -0
  17. assertpy/_engine/_operations.py +75 -0
  18. assertpy/_engine/_ordering.py +884 -0
  19. assertpy/_engine/_pairing.py +70 -0
  20. assertpy/_engine/_path.py +158 -0
  21. assertpy/_engine/_poll_typing.py +6039 -0
  22. assertpy/_engine/_require.py +312 -0
  23. assertpy/_engine/_size.py +31 -0
  24. assertpy/_engine/_text.py +39 -0
  25. assertpy/_engine/_typing.py +1226 -0
  26. assertpy/_hints.py +1213 -0
  27. assertpy/_inline.py +484 -0
  28. assertpy/_matcher_impls.py +1876 -0
  29. assertpy/_passes.py +249 -0
  30. assertpy/_renamed.py +64 -0
  31. assertpy/_satisfies.py +835 -0
  32. assertpy/_snapshot_codec.py +290 -0
  33. assertpy/assertpy.py +2640 -0
  34. assertpy/async_assertions.py +864 -0
  35. assertpy/base.py +862 -0
  36. assertpy/behave_matchers.py +96 -0
  37. assertpy/bytes_mixin.py +158 -0
  38. assertpy/collection.py +528 -0
  39. assertpy/contains.py +1068 -0
  40. assertpy/dataframe.py +200 -0
  41. assertpy/date.py +327 -0
  42. assertpy/dict.py +249 -0
  43. assertpy/dynamic.py +222 -0
  44. assertpy/errors.py +782 -0
  45. assertpy/exception.py +838 -0
  46. assertpy/extracting.py +266 -0
  47. assertpy/file.py +324 -0
  48. assertpy/helpers.py +747 -0
  49. assertpy/http_mixin.py +218 -0
  50. assertpy/json_mixin.py +1265 -0
  51. assertpy/matchers.py +639 -0
  52. assertpy/numeric.py +696 -0
  53. assertpy/outcome.py +163 -0
  54. assertpy/py.typed +0 -0
  55. assertpy/pytest_plugin.py +1650 -0
  56. assertpy/snapshot.py +1031 -0
  57. assertpy/string.py +803 -0
  58. assertpy/warning.py +137 -0
  59. assertpy-2.35.0.dist-info/METADATA +324 -0
  60. assertpy-2.35.0.dist-info/RECORD +63 -0
  61. assertpy-2.35.0.dist-info/WHEEL +4 -0
  62. assertpy-2.35.0.dist-info/entry_points.txt +2 -0
  63. assertpy-2.35.0.dist-info/licenses/LICENSE +28 -0
@@ -0,0 +1,772 @@
1
+ """The surface of a value the capability umbrella claims.
2
+
3
+ Generated by `scripts/generate_poll_protocols.py`.
4
+
5
+ Do not edit. `assert_that()` hands this back for a value that answers to some capability and to no
6
+ overload by name: a model, a dataclass, an HTTP response, a container of one's own. It offers what the
7
+ builder offers, because that is what such a value used to get and none of it can be taken away without
8
+ refusing a call that runs.
9
+
10
+ What it exists to add is one restriction. The six ordering assertions read the value with an ordering,
11
+ so a builder over a value that has none is not one they can be asked of. Before this,
12
+ `assert_that(a_mapping).is_positive()` type-checked on ty, mypy and Pyright, the three gated then, and raised
13
+ ran.
14
+
15
+ A protocol rather than a subclass of the builder: narrowing ``self`` in a subclass is an invalid
16
+ override, measured on ty, and the working precedents that narrow it all end in a rung open to anything,
17
+ which is what a refusal cannot have.
18
+ """
19
+
20
+ from __future__ import annotations
21
+
22
+ from typing import TYPE_CHECKING
23
+
24
+ if TYPE_CHECKING:
25
+ import datetime
26
+ import logging
27
+ import re
28
+ from collections.abc import Callable, Iterable, Mapping, Sized
29
+ from pathlib import Path
30
+ from typing import Any, Protocol, SupportsFloat, SupportsIndex, TypeVar, overload
31
+
32
+ from typing_extensions import TypeIs
33
+
34
+ from .._matcher_impls import ClassInfo, ExceptionInfo, RetriedInfo, WarningInfo
35
+ from ..assertpy import AssertionBuilder
36
+ from ..matchers import Matcher
37
+ from ._builder_check_typing import _CheckAnyValue
38
+ from ._compat import Self
39
+ from ._poll_typing import _AsyncPoll, _NoExpectationOnAChain, _SyncPoll
40
+ from ._typing import (
41
+ _E,
42
+ _K,
43
+ _R,
44
+ _U,
45
+ _V,
46
+ _ExpectedCompletionAssertion,
47
+ _ExpectedRaiseAssertion,
48
+ _ExpectedWarningAssertion,
49
+ _Landed,
50
+ _ListAssertion,
51
+ )
52
+
53
+ # covariant: the façade only ever hands the subject back, through `value`
54
+ _CapableT_co = TypeVar("_CapableT_co", covariant=True)
55
+ _U2 = TypeVar("_U2")
56
+ _U3 = TypeVar("_U3")
57
+ _E_co = TypeVar("_E_co", covariant=True)
58
+
59
+ class _Orderable(Protocol):
60
+ """A value with an ordering, which is all the relational assertions ask of one."""
61
+
62
+ def __lt__(self, other: Any, /) -> Any: ...
63
+
64
+ class _Indexed(Protocol[_E_co]):
65
+ """The older way to be a sequence: integer lookup that stops with `IndexError`, and no `__iter__`.
66
+
67
+ `list(value)` accepts it, so `contains_in_order()` runs on it, and asking only for `Iterable`
68
+ refused a value that works.
69
+
70
+ One shape gets through that the runtime refuses, and it cannot be spelled out of: a class with
71
+ this lookup and ``__iter__ = None`` disables the fallback, so `list(value)` raises while this
72
+ still matches. Structural typing has no way to ask for the absence of a member, and the
73
+ direction is the safe one: the call is accepted here and refused with "val must be iterable"
74
+ when it runs, which is what every other umbrella rung already does.
75
+ """
76
+
77
+ def __getitem__(self, index: int, /) -> _E_co: ...
78
+
79
+ class _Keyed(Protocol):
80
+ """`keys()`, which the dict gate reads before anything else.
81
+
82
+ Iterability is read too and is deliberately NOT here: the gate asks
83
+ `isinstance(value, collections.abc.Iterable)`, which a class earns by registration, and
84
+ requiring `__iter__` structurally refused a registered value that runs. Same blind spot as
85
+ `numbers.Number` in the numeric family, and the same answer.
86
+ """
87
+
88
+ def keys(self) -> Any: ...
89
+
90
+ class _KeyedWithItems(_Keyed, Protocol):
91
+ """And a lookup, which reading an entry needs and reading a key does not."""
92
+
93
+ def __getitem__(self, key: Any, /) -> Any: ...
94
+
95
+ class _KeyedWithValues(_Keyed, Protocol):
96
+ """And the values, which only the value pair reads. A lookup is not enough: measured on a
97
+ subject carrying `keys` and `__getitem__`, `contains_value` still refuses."""
98
+
99
+ def values(self) -> Any: ...
100
+
101
+ class _PathLike(Protocol):
102
+ """A value the filesystem assertions can read a path out of, spelled as `os.PathLike` spells it."""
103
+
104
+ def __fspath__(self) -> Any: ...
105
+
106
+ class _Callable(Protocol):
107
+ """A value the exception and warning assertions can call, which is what `callable()` asks."""
108
+
109
+ def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
110
+
111
+ class _ElementSource(Protocol[_E_co]):
112
+ """Anything whose value can be walked for `_E_co`, spelled the way the builder spells it.
113
+
114
+ `Iterable` and not `Collection`: a value with only `__iter__` fell through to the `Self` overload,
115
+ so `first()` kept the container's type after the value had become an element.
116
+ """
117
+
118
+ @property
119
+ def value(self) -> Iterable[_E_co]: ...
120
+
121
+ class _CapableAssertion(Protocol[_CapableT_co]):
122
+ """What a value the umbrella claims can be asked."""
123
+
124
+ # the data the builder carries: absent from `dir()`, so `__getattr__` read `description` as a callable
125
+ val: Any
126
+ description: str
127
+ kind: str | None
128
+ expected: type[BaseException] | ExceptionInfo | None
129
+ logger: logging.LoggerAdapter[Any]
130
+
131
+ @property
132
+ def value(self) -> _CapableT_co: ...
133
+ @property
134
+ def not_(self) -> _NegatedCapableAssertion[_CapableT_co]: ...
135
+ def __getattr__(self, name: str) -> Callable[..., Self]: ...
136
+
137
+ # the builder's ladders, carried across: a narrowing lost here is lost for every value the umbrella claims
138
+ @overload
139
+ def is_not_none(self: _CapableAssertion[_U | None]) -> _CapableAssertion[_U]: ...
140
+ @overload
141
+ def is_not_none(self) -> Self: ...
142
+ @overload
143
+ def is_instance_of(self, some_class: tuple[type[_U], type[_U2]]) -> AssertionBuilder[_U | _U2]: ...
144
+ @overload
145
+ def is_instance_of(
146
+ self, some_class: tuple[type[_U], type[_U2], type[_U3]]
147
+ ) -> AssertionBuilder[_U | _U2 | _U3]: ...
148
+ @overload
149
+ def is_instance_of(self, some_class: type[_U]) -> AssertionBuilder[_U]: ...
150
+ @overload
151
+ def is_instance_of(self, some_class: ClassInfo) -> Self: ...
152
+ @overload
153
+ def is_instance_of_any(self, first: type[_U], second: type[_U2], /) -> AssertionBuilder[_U | _U2]: ...
154
+ @overload
155
+ def is_instance_of_any(
156
+ self, first: type[_U], second: type[_U2], third: type[_U3], /
157
+ ) -> AssertionBuilder[_U | _U2 | _U3]: ...
158
+ @overload
159
+ def is_instance_of_any(self, *some_classes: ClassInfo) -> Self: ...
160
+ @overload
161
+ def first(self: _CapableAssertion[Mapping[_K, _V]]) -> AssertionBuilder[_K]: ...
162
+ @overload
163
+ def first(self: _ElementSource[_E]) -> AssertionBuilder[_E]: ...
164
+ @overload
165
+ def first(self) -> Self: ...
166
+ @overload
167
+ def last(self: _CapableAssertion[Mapping[_K, _V]]) -> AssertionBuilder[_K]: ...
168
+ @overload
169
+ def last(self: _ElementSource[_E]) -> AssertionBuilder[_E]: ...
170
+ @overload
171
+ def last(self) -> Self: ...
172
+ @overload
173
+ def element(self: _CapableAssertion[Mapping[_K, _V]], index: SupportsIndex) -> AssertionBuilder[_K]: ...
174
+ @overload
175
+ def element(self: _ElementSource[_E], index: SupportsIndex) -> AssertionBuilder[_E]: ...
176
+ @overload
177
+ def element(self, index: SupportsIndex) -> Self: ...
178
+ @overload
179
+ def mapped(self: _ElementSource[_E], func: Callable[[_E], _R]) -> AssertionBuilder[list[_R]]: ...
180
+ @overload
181
+ def mapped(self, func: Callable[..., Any]) -> Self: ...
182
+ @overload
183
+ def single(self: _CapableAssertion[Mapping[_K, _V]]) -> AssertionBuilder[_K]: ...
184
+ @overload
185
+ def single(self: _ElementSource[_E]) -> AssertionBuilder[_E]: ...
186
+ @overload
187
+ def single(self) -> Self: ...
188
+ @overload
189
+ def satisfies(self, matcher: Callable[[Any], TypeIs[_U]]) -> AssertionBuilder[_U]: ...
190
+ @overload
191
+ def satisfies(self, matcher: Matcher[Any] | Callable[..., bool]) -> Self: ...
192
+ # the polling pivots, over `Any`: no capability says the value is callable, so the chain keeps every rung open
193
+ def eventually(
194
+ self,
195
+ *,
196
+ timeout: float = ...,
197
+ interval: float = ...,
198
+ ignoring: type[Exception] | RetriedInfo = ...,
199
+ trace: bool = ...,
200
+ ) -> _AsyncPoll[Any]: ...
201
+ def eventually_sync(
202
+ self,
203
+ *,
204
+ timeout: float = ...,
205
+ interval: float = ...,
206
+ ignoring: type[Exception] | RetriedInfo = ...,
207
+ trace: bool = ...,
208
+ ) -> _SyncPoll[Any]: ...
209
+ # where the callable view lands: flattened, the runtime's `-> Self` kept a caught message typed as the callable
210
+ @overload
211
+ def raises(self: _CapableAssertion[_Callable], ex: type[_Landed]) -> _ExpectedRaiseAssertion[Any, _Landed]: ...
212
+ @overload
213
+ def raises(
214
+ self: _CapableAssertion[_Callable], ex: type | ExceptionInfo
215
+ ) -> _ExpectedRaiseAssertion[Any, BaseException]: ...
216
+ def does_not_raise(
217
+ self: _CapableAssertion[_Callable], ex: type | ExceptionInfo
218
+ ) -> _ExpectedCompletionAssertion[Any]: ...
219
+ def warns(
220
+ self: _CapableAssertion[_Callable], warning: type[Warning] | WarningInfo = ...
221
+ ) -> _ExpectedWarningAssertion[Any]: ...
222
+ def does_not_warn(
223
+ self: _CapableAssertion[_Callable], warning: type[Warning] | WarningInfo = ...
224
+ ) -> _ExpectedCompletionAssertion[Any]: ...
225
+
226
+ when_called_with: _NoExpectationOnAChain
227
+
228
+ # the builder's own helpers: left to `__getattr__`, `builder()` read as this facade over the value already here
229
+ def builder(
230
+ self,
231
+ val: Any,
232
+ description: str = ...,
233
+ kind: str | None = ...,
234
+ expected: Any = ...,
235
+ logger: Any = ...,
236
+ origin: Any = ...,
237
+ ) -> AssertionBuilder[Any]: ...
238
+ def error(
239
+ self,
240
+ msg: str,
241
+ *,
242
+ actual: Any = ...,
243
+ expected: Any = ...,
244
+ diff: Any = ...,
245
+ trace: Any = ...,
246
+ suppress_context: bool = ...,
247
+ ) -> Self: ...
248
+ def check(self) -> _CheckAnyValue[_CapableT_co]: ...
249
+ def all_fields_satisfy(
250
+ self, matcher: Matcher[Any] | Callable[..., bool], *, allow_empty: bool = ...
251
+ ) -> Self: ...
252
+ def all_satisfy(self, matcher: Matcher[Any] | Callable[..., bool], *, allow_empty: bool = ...) -> Self: ...
253
+ def any_satisfy(self, matcher: Matcher[Any] | Callable[..., bool]) -> Self: ...
254
+ def at_json_path(self, path: str) -> AssertionBuilder[Any]: ...
255
+ def caused_by(self, ex: ClassInfo) -> AssertionBuilder[Any]: ...
256
+ def conforms_to_openapi(
257
+ self,
258
+ spec: dict[str, Any],
259
+ path: str,
260
+ method: str,
261
+ *,
262
+ status: str | int | None = ...,
263
+ content_type: str = ...,
264
+ strict_nullable: bool = ...,
265
+ ) -> Self: ...
266
+ def contains(self, *items: object) -> Self: ...
267
+ def contains_any_of(self, *items: str) -> Self: ...
268
+ def contains_bytes(
269
+ self: _CapableAssertion[bytes | bytearray], sub: bytes | bytearray
270
+ ) -> _CapableAssertion[_CapableT_co]: ...
271
+ def contains_duplicates(self) -> Self: ...
272
+ def contains_entry(
273
+ self: _CapableAssertion[_KeyedWithItems], *args: object, **kwargs: object
274
+ ) -> _CapableAssertion[_CapableT_co]: ...
275
+ def contains_error(self, *ex_types: type | ExceptionInfo) -> Self: ...
276
+ def contains_exactly(self, *items: object) -> Self: ...
277
+ def contains_exactly_in_any_order(self, *items: object) -> Self: ...
278
+ def contains_ignoring_case(self, *items: str) -> Self: ...
279
+ def contains_in_order(
280
+ self: _CapableAssertion[Iterable[_E] | _Indexed[_E]], *items: object
281
+ ) -> _CapableAssertion[_CapableT_co]: ...
282
+ def contains_key(self: _CapableAssertion[_Keyed], *keys: object) -> _CapableAssertion[_CapableT_co]: ...
283
+ def contains_none_of(self, *items: str) -> Self: ...
284
+ def contains_only(self, *items: object) -> Self: ...
285
+ def contains_only_once(self, *items: object) -> Self: ...
286
+ def contains_sequence(self, *items: object) -> Self: ...
287
+ def contains_value(
288
+ self: _CapableAssertion[_KeyedWithValues], *values: object
289
+ ) -> _CapableAssertion[_CapableT_co]: ...
290
+ def decoded_as(self: _CapableAssertion[bytes | bytearray], encoding: str = ...) -> AssertionBuilder[Any]: ...
291
+ def decoded_as_json(self) -> AssertionBuilder[object]: ...
292
+ def described_as(self, description: str) -> Self: ...
293
+ def does_not_contain(self, *items: object) -> Self: ...
294
+ def does_not_contain_duplicates(self) -> Self: ...
295
+ def does_not_contain_entry(
296
+ self: _CapableAssertion[_KeyedWithItems], *args: object, **kwargs: object
297
+ ) -> _CapableAssertion[_CapableT_co]: ...
298
+ def does_not_contain_error(self, *ex_types: type | ExceptionInfo) -> Self: ...
299
+ def does_not_contain_key(self: _CapableAssertion[_Keyed], *keys: object) -> _CapableAssertion[_CapableT_co]: ...
300
+ def does_not_contain_value(
301
+ self: _CapableAssertion[_KeyedWithValues], *values: object
302
+ ) -> _CapableAssertion[_CapableT_co]: ...
303
+ def does_not_exist(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
304
+ def does_not_have_json_path(self, path: str) -> Self: ...
305
+ def does_not_match(
306
+ self: _CapableAssertion[str], pattern: str | re.Pattern[str]
307
+ ) -> _CapableAssertion[_CapableT_co]: ...
308
+ def each(self, matcher: Matcher[Any] | Callable[..., bool], *, allow_empty: bool = ...) -> Self: ...
309
+ def ends_with(self, suffix: object) -> Self: ...
310
+ def ends_with_ignoring_case(self: _CapableAssertion[str], suffix: str) -> _CapableAssertion[_CapableT_co]: ...
311
+ def error_of(self, ex: type) -> AssertionBuilder[Any]: ...
312
+ def errors(self) -> AssertionBuilder[Any]: ...
313
+ def exists(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
314
+ def extracting(self, *names: object, **kwargs: object) -> _ListAssertion[Any]: ...
315
+ def extracting_group(
316
+ self: _CapableAssertion[str], pattern: str | re.Pattern[str], group: int | str = ...
317
+ ) -> AssertionBuilder[Any]: ...
318
+ def filtered_on(self, predicate: Matcher[Any] | Callable[[Any], bool]) -> _ListAssertion[Any]: ...
319
+ def flat_mapped(self, func: Callable[[Any], Iterable[Any]]) -> _ListAssertion[Any]: ...
320
+ def has_byte_at(
321
+ self: _CapableAssertion[bytes | bytearray], index: SupportsIndex, expected: SupportsIndex
322
+ ) -> _CapableAssertion[_CapableT_co]: ...
323
+ def has_json_path(self, path: str) -> Self: ...
324
+ def has_no_none_fields(self, *, allow_empty: bool = ...) -> Self: ...
325
+ def has_root_cause(self, ex: ClassInfo) -> AssertionBuilder[Any]: ...
326
+ def has_same_size_as(self, other: Sized) -> Self: ...
327
+ def has_size_between(self, low: SupportsIndex, high: SupportsIndex) -> Self: ...
328
+ def has_size_greater_than(self, size: SupportsIndex) -> Self: ...
329
+ def has_size_less_than(self, size: SupportsIndex) -> Self: ...
330
+ def is_after(
331
+ self: _CapableAssertion[datetime.datetime], other: datetime.datetime
332
+ ) -> _CapableAssertion[_CapableT_co]: ...
333
+ def is_after_or_equal_to(
334
+ self: _CapableAssertion[datetime.datetime], other: datetime.datetime
335
+ ) -> _CapableAssertion[_CapableT_co]: ...
336
+ def is_alpha(self: _CapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
337
+ def is_alphanumeric(self: _CapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
338
+ def is_array_close_to(
339
+ self, expected: object, *, rtol: float = ..., atol: float = ..., equal_nan: bool = ..., **options: Any
340
+ ) -> Self: ...
341
+ def is_array_equal(self, expected: object, **options: Any) -> Self: ...
342
+ def is_before(
343
+ self: _CapableAssertion[datetime.datetime], other: datetime.datetime
344
+ ) -> _CapableAssertion[_CapableT_co]: ...
345
+ def is_before_or_equal_to(
346
+ self: _CapableAssertion[datetime.datetime], other: datetime.datetime
347
+ ) -> _CapableAssertion[_CapableT_co]: ...
348
+ def is_between(self, low: object, high: object) -> Self: ...
349
+ def is_callable(self) -> Self: ...
350
+ def is_child_of(self: _CapableAssertion[_PathLike], parent: object) -> _CapableAssertion[_CapableT_co]: ...
351
+ def is_close_to(
352
+ self: _CapableAssertion[SupportsFloat | SupportsIndex],
353
+ other: SupportsFloat | SupportsIndex | datetime.datetime,
354
+ tolerance: SupportsFloat | SupportsIndex | datetime.timedelta | None = ...,
355
+ *,
356
+ rel: SupportsFloat | SupportsIndex | None = ...,
357
+ ) -> _CapableAssertion[_CapableT_co]: ...
358
+ def is_digit(self: _CapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
359
+ def is_directory(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
360
+ def is_divisible_by(
361
+ self: _CapableAssertion[int], divisor: SupportsIndex
362
+ ) -> _CapableAssertion[_CapableT_co]: ...
363
+ def is_empty(self) -> Self: ...
364
+ def is_equal_to(self, other: object, **kwargs: object) -> Self: ...
365
+ def is_equal_to_ignoring_case(self: _CapableAssertion[str], other: str) -> _CapableAssertion[_CapableT_co]: ...
366
+ def is_equal_to_ignoring_milliseconds(
367
+ self: _CapableAssertion[datetime.datetime], other: datetime.datetime
368
+ ) -> _CapableAssertion[_CapableT_co]: ...
369
+ def is_equal_to_ignoring_seconds(
370
+ self: _CapableAssertion[datetime.datetime], other: datetime.datetime
371
+ ) -> _CapableAssertion[_CapableT_co]: ...
372
+ def is_equal_to_ignoring_time(
373
+ self: _CapableAssertion[datetime.datetime], other: datetime.datetime
374
+ ) -> _CapableAssertion[_CapableT_co]: ...
375
+ def is_equal_to_ignoring_whitespace(
376
+ self: _CapableAssertion[str], other: str
377
+ ) -> _CapableAssertion[_CapableT_co]: ...
378
+ def is_even(self: _CapableAssertion[int]) -> _CapableAssertion[_CapableT_co]: ...
379
+ def is_executable(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
380
+ def is_false(self) -> Self: ...
381
+ def is_file(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
382
+ def is_frame_equal(self, expected: object, **options: Any) -> Self: ...
383
+ def is_greater_than(self: _CapableAssertion[_Orderable], other: object) -> _CapableAssertion[_CapableT_co]: ...
384
+ def is_greater_than_or_equal_to(
385
+ self: _CapableAssertion[_Orderable], other: object
386
+ ) -> _CapableAssertion[_CapableT_co]: ...
387
+ def is_hex_equal_to(
388
+ self: _CapableAssertion[bytes | bytearray], expected_hex: str
389
+ ) -> _CapableAssertion[_CapableT_co]: ...
390
+ def is_in(self, *items: object) -> Self: ...
391
+ def is_inf(self: _CapableAssertion[SupportsFloat | SupportsIndex]) -> _CapableAssertion[_CapableT_co]: ...
392
+ def is_iterable(self) -> Self: ...
393
+ def is_length(self, length: SupportsIndex | Matcher[int]) -> Self: ...
394
+ def is_length_between(self, low: SupportsIndex, high: SupportsIndex) -> Self: ...
395
+ def is_less_than(self: _CapableAssertion[_Orderable], other: object) -> _CapableAssertion[_CapableT_co]: ...
396
+ def is_less_than_or_equal_to(
397
+ self: _CapableAssertion[_Orderable], other: object
398
+ ) -> _CapableAssertion[_CapableT_co]: ...
399
+ def is_lower(self: _CapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
400
+ def is_named(self: _CapableAssertion[_PathLike], filename: str) -> _CapableAssertion[_CapableT_co]: ...
401
+ def is_nan(self: _CapableAssertion[SupportsFloat | SupportsIndex]) -> _CapableAssertion[_CapableT_co]: ...
402
+ def is_negative(self: _CapableAssertion[_Orderable]) -> _CapableAssertion[_CapableT_co]: ...
403
+ def is_none(self) -> Self: ...
404
+ def is_not_between(self, low: object, high: object) -> Self: ...
405
+ def is_not_callable(self) -> Self: ...
406
+ def is_not_close_to(
407
+ self,
408
+ other: SupportsFloat | SupportsIndex | datetime.datetime,
409
+ tolerance: SupportsFloat | SupportsIndex | datetime.timedelta | None = ...,
410
+ *,
411
+ rel: SupportsFloat | SupportsIndex | None = ...,
412
+ ) -> Self: ...
413
+ def is_not_empty(self) -> Self: ...
414
+ def is_not_equal_to(self, other: object) -> Self: ...
415
+ def is_not_in(self, *items: object) -> Self: ...
416
+ def is_not_inf(self: _CapableAssertion[SupportsFloat | SupportsIndex]) -> _CapableAssertion[_CapableT_co]: ...
417
+ def is_not_iterable(self) -> Self: ...
418
+ def is_not_nan(self: _CapableAssertion[SupportsFloat | SupportsIndex]) -> _CapableAssertion[_CapableT_co]: ...
419
+ def is_not_same_as(self, other: object) -> Self: ...
420
+ def is_not_zero(self) -> Self: ...
421
+ def is_odd(self: _CapableAssertion[int]) -> _CapableAssertion[_CapableT_co]: ...
422
+ def is_positive(self: _CapableAssertion[_Orderable]) -> _CapableAssertion[_CapableT_co]: ...
423
+ def is_readable(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
424
+ def is_same_as(self, other: object) -> Self: ...
425
+ def is_sorted(
426
+ self, key: Callable[[Any], Any] = ..., reverse: bool = ..., *, allow_empty: bool = ...
427
+ ) -> Self: ...
428
+ def is_subclass_of(self, some_class: ClassInfo) -> Self: ...
429
+ def is_subset_of(self, *supersets: object, allow_empty: bool = ...) -> Self: ...
430
+ def is_true(self) -> Self: ...
431
+ def is_type_of(self, some_type: type) -> Self: ...
432
+ def is_unicode(self) -> Self: ...
433
+ def is_upper(self: _CapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
434
+ def is_valid_encoding(
435
+ self: _CapableAssertion[bytes | bytearray], encoding: str
436
+ ) -> _CapableAssertion[_CapableT_co]: ...
437
+ def is_valid_utf8(self: _CapableAssertion[bytes | bytearray]) -> _CapableAssertion[_CapableT_co]: ...
438
+ def is_whitespace(self: _CapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
439
+ def is_writable(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
440
+ def is_zero(self) -> Self: ...
441
+ def matches(
442
+ self: _CapableAssertion[str], pattern: str | re.Pattern[str]
443
+ ) -> _CapableAssertion[_CapableT_co]: ...
444
+ def matches_contract_snapshot(self, id: str | None = ..., path: str = ...) -> Self: ...
445
+ def matches_error_tree(self, *expected: type | list[Any]) -> Self: ...
446
+ def matches_inline(
447
+ self,
448
+ expected: object = ...,
449
+ *,
450
+ ignore: object = ...,
451
+ include: object = ...,
452
+ tolerance: float | None = ...,
453
+ rel: float | None = ...,
454
+ comparators: dict[Any, Callable[[Any, Any], Any]] | None = ...,
455
+ placeholders: Mapping[Any, Matcher[Any] | Callable[[Any], object]] | None = ...,
456
+ ) -> Self: ...
457
+ def matches_json_schema(self, schema: dict[str, Any]) -> Self: ...
458
+ def matches_json_schema_from_file(self, path: str | Path) -> Self: ...
459
+ def matches_structure(self, spec: dict[Any, Any]) -> Self: ...
460
+ def matches_with_groups(
461
+ self: _CapableAssertion[str], pattern: str | re.Pattern[str]
462
+ ) -> AssertionBuilder[Any]: ...
463
+ def none_satisfy(self, matcher: Matcher[Any] | Callable[..., bool]) -> Self: ...
464
+ def raised(self) -> AssertionBuilder[Any]: ...
465
+ def returned(self) -> AssertionBuilder[Any]: ...
466
+ def satisfies_exactly(self, *matchers: Matcher[Any] | Callable[..., bool]) -> Self: ...
467
+ def satisfies_exactly_in_any_order(self, *matchers: Matcher[Any] | Callable[..., bool]) -> Self: ...
468
+ def snapshot(
469
+ self,
470
+ id: str | None = ...,
471
+ path: str = ...,
472
+ *,
473
+ ignore: object = ...,
474
+ include: object = ...,
475
+ tolerance: float | None = ...,
476
+ rel: float | None = ...,
477
+ comparators: dict[Any, Callable[[Any, Any], Any]] | None = ...,
478
+ placeholders: Mapping[Any, Matcher[Any] | Callable[[Any], object]] | None = ...,
479
+ ) -> Self: ...
480
+ def starts_with(self, prefix: object) -> Self: ...
481
+ def starts_with_bytes(
482
+ self: _CapableAssertion[bytes | bytearray], prefix: bytes | bytearray
483
+ ) -> _CapableAssertion[_CapableT_co]: ...
484
+ def starts_with_ignoring_case(self: _CapableAssertion[str], prefix: str) -> _CapableAssertion[_CapableT_co]: ...
485
+ def zip_satisfies(
486
+ self, other: Iterable[object], predicate: Callable[..., bool], *, allow_empty: bool = ...
487
+ ) -> Self: ...
488
+
489
+ class _NegatedCapableAssertion(Protocol[_CapableT_co]):
490
+ """The negation twin of the capability facade: one step, then it back."""
491
+
492
+ def is_not_none(self) -> _CapableAssertion[_CapableT_co]: ...
493
+ @overload
494
+ def is_instance_of(self, some_class: tuple[type[_U], type[_U2]]) -> _CapableAssertion[_CapableT_co]: ...
495
+ @overload
496
+ def is_instance_of(
497
+ self, some_class: tuple[type[_U], type[_U2], type[_U3]]
498
+ ) -> _CapableAssertion[_CapableT_co]: ...
499
+ @overload
500
+ def is_instance_of(self, some_class: type[_U]) -> _CapableAssertion[_CapableT_co]: ...
501
+ @overload
502
+ def is_instance_of(self, some_class: ClassInfo) -> _CapableAssertion[_CapableT_co]: ...
503
+ @overload
504
+ def is_instance_of_any(self, first: type[_U], second: type[_U2], /) -> _CapableAssertion[_CapableT_co]: ...
505
+ @overload
506
+ def is_instance_of_any(
507
+ self, first: type[_U], second: type[_U2], third: type[_U3], /
508
+ ) -> _CapableAssertion[_CapableT_co]: ...
509
+ @overload
510
+ def is_instance_of_any(self, *some_classes: ClassInfo) -> _CapableAssertion[_CapableT_co]: ...
511
+ def satisfies(self, matcher: Matcher[Any] | Callable[..., bool]) -> _CapableAssertion[_CapableT_co]: ...
512
+ def all_fields_satisfy(
513
+ self, matcher: Matcher[Any] | Callable[..., bool], *, allow_empty: bool = ...
514
+ ) -> _CapableAssertion[_CapableT_co]: ...
515
+ def all_satisfy(
516
+ self, matcher: Matcher[Any] | Callable[..., bool], *, allow_empty: bool = ...
517
+ ) -> _CapableAssertion[_CapableT_co]: ...
518
+ def any_satisfy(self, matcher: Matcher[Any] | Callable[..., bool]) -> _CapableAssertion[_CapableT_co]: ...
519
+ def caused_by(self, ex: ClassInfo) -> _CapableAssertion[_CapableT_co]: ...
520
+ def conforms_to_openapi(
521
+ self,
522
+ spec: dict[str, Any],
523
+ path: str,
524
+ method: str,
525
+ *,
526
+ status: str | int | None = ...,
527
+ content_type: str = ...,
528
+ strict_nullable: bool = ...,
529
+ ) -> _CapableAssertion[_CapableT_co]: ...
530
+ def contains(self, *items: object) -> _CapableAssertion[_CapableT_co]: ...
531
+ def contains_any_of(self, *items: str) -> _CapableAssertion[_CapableT_co]: ...
532
+ def contains_bytes(
533
+ self: _NegatedCapableAssertion[bytes | bytearray], sub: bytes | bytearray
534
+ ) -> _CapableAssertion[_CapableT_co]: ...
535
+ def contains_duplicates(self) -> _CapableAssertion[_CapableT_co]: ...
536
+ def contains_entry(
537
+ self: _NegatedCapableAssertion[_KeyedWithItems], *args: object, **kwargs: object
538
+ ) -> _CapableAssertion[_CapableT_co]: ...
539
+ def contains_error(self, *ex_types: type | ExceptionInfo) -> _CapableAssertion[_CapableT_co]: ...
540
+ def contains_exactly(self, *items: object) -> _CapableAssertion[_CapableT_co]: ...
541
+ def contains_exactly_in_any_order(self, *items: object) -> _CapableAssertion[_CapableT_co]: ...
542
+ def contains_ignoring_case(self, *items: str) -> _CapableAssertion[_CapableT_co]: ...
543
+ def contains_in_order(
544
+ self: _NegatedCapableAssertion[Iterable[_E] | _Indexed[_E]], *items: object
545
+ ) -> _CapableAssertion[_CapableT_co]: ...
546
+ def contains_key(self: _NegatedCapableAssertion[_Keyed], *keys: object) -> _CapableAssertion[_CapableT_co]: ...
547
+ def contains_none_of(self, *items: str) -> _CapableAssertion[_CapableT_co]: ...
548
+ def contains_only(self, *items: object) -> _CapableAssertion[_CapableT_co]: ...
549
+ def contains_only_once(self, *items: object) -> _CapableAssertion[_CapableT_co]: ...
550
+ def contains_sequence(self, *items: object) -> _CapableAssertion[_CapableT_co]: ...
551
+ def contains_value(
552
+ self: _NegatedCapableAssertion[_KeyedWithValues], *values: object
553
+ ) -> _CapableAssertion[_CapableT_co]: ...
554
+ def does_not_contain(self, *items: object) -> _CapableAssertion[_CapableT_co]: ...
555
+ def does_not_contain_duplicates(self) -> _CapableAssertion[_CapableT_co]: ...
556
+ def does_not_contain_entry(
557
+ self: _NegatedCapableAssertion[_KeyedWithItems], *args: object, **kwargs: object
558
+ ) -> _CapableAssertion[_CapableT_co]: ...
559
+ def does_not_contain_error(self, *ex_types: type | ExceptionInfo) -> _CapableAssertion[_CapableT_co]: ...
560
+ def does_not_contain_key(
561
+ self: _NegatedCapableAssertion[_Keyed], *keys: object
562
+ ) -> _CapableAssertion[_CapableT_co]: ...
563
+ def does_not_contain_value(
564
+ self: _NegatedCapableAssertion[_KeyedWithValues], *values: object
565
+ ) -> _CapableAssertion[_CapableT_co]: ...
566
+ def does_not_exist(self: _NegatedCapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
567
+ def does_not_have_json_path(self, path: str) -> _CapableAssertion[_CapableT_co]: ...
568
+ def does_not_match(
569
+ self: _NegatedCapableAssertion[str], pattern: str | re.Pattern[str]
570
+ ) -> _CapableAssertion[_CapableT_co]: ...
571
+ def each(
572
+ self, matcher: Matcher[Any] | Callable[..., bool], *, allow_empty: bool = ...
573
+ ) -> _CapableAssertion[_CapableT_co]: ...
574
+ def ends_with(self, suffix: object) -> _CapableAssertion[_CapableT_co]: ...
575
+ def ends_with_ignoring_case(
576
+ self: _NegatedCapableAssertion[str], suffix: str
577
+ ) -> _CapableAssertion[_CapableT_co]: ...
578
+ def error_of(self, ex: type) -> _CapableAssertion[_CapableT_co]: ...
579
+ def exists(self: _NegatedCapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
580
+ def extracting_group(
581
+ self: _NegatedCapableAssertion[str], pattern: str | re.Pattern[str], group: int | str = ...
582
+ ) -> _CapableAssertion[_CapableT_co]: ...
583
+ def has_byte_at(
584
+ self: _NegatedCapableAssertion[bytes | bytearray], index: SupportsIndex, expected: SupportsIndex
585
+ ) -> _CapableAssertion[_CapableT_co]: ...
586
+ def has_json_path(self, path: str) -> _CapableAssertion[_CapableT_co]: ...
587
+ def has_no_none_fields(self, *, allow_empty: bool = ...) -> _CapableAssertion[_CapableT_co]: ...
588
+ def has_root_cause(self, ex: ClassInfo) -> _CapableAssertion[_CapableT_co]: ...
589
+ def has_same_size_as(self, other: Sized) -> _CapableAssertion[_CapableT_co]: ...
590
+ def has_size_between(self, low: SupportsIndex, high: SupportsIndex) -> _CapableAssertion[_CapableT_co]: ...
591
+ def has_size_greater_than(self, size: SupportsIndex) -> _CapableAssertion[_CapableT_co]: ...
592
+ def has_size_less_than(self, size: SupportsIndex) -> _CapableAssertion[_CapableT_co]: ...
593
+ def is_after(
594
+ self: _NegatedCapableAssertion[datetime.datetime], other: datetime.datetime
595
+ ) -> _CapableAssertion[_CapableT_co]: ...
596
+ def is_after_or_equal_to(
597
+ self: _NegatedCapableAssertion[datetime.datetime], other: datetime.datetime
598
+ ) -> _CapableAssertion[_CapableT_co]: ...
599
+ def is_alpha(self: _NegatedCapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
600
+ def is_alphanumeric(self: _NegatedCapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
601
+ def is_array_close_to(
602
+ self, expected: object, *, rtol: float = ..., atol: float = ..., equal_nan: bool = ..., **options: Any
603
+ ) -> _CapableAssertion[_CapableT_co]: ...
604
+ def is_array_equal(self, expected: object, **options: Any) -> _CapableAssertion[_CapableT_co]: ...
605
+ def is_before(
606
+ self: _NegatedCapableAssertion[datetime.datetime], other: datetime.datetime
607
+ ) -> _CapableAssertion[_CapableT_co]: ...
608
+ def is_before_or_equal_to(
609
+ self: _NegatedCapableAssertion[datetime.datetime], other: datetime.datetime
610
+ ) -> _CapableAssertion[_CapableT_co]: ...
611
+ def is_between(self, low: object, high: object) -> _CapableAssertion[_CapableT_co]: ...
612
+ def is_callable(self) -> _CapableAssertion[_CapableT_co]: ...
613
+ def is_child_of(
614
+ self: _NegatedCapableAssertion[_PathLike], parent: object
615
+ ) -> _CapableAssertion[_CapableT_co]: ...
616
+ def is_close_to(
617
+ self: _NegatedCapableAssertion[SupportsFloat | SupportsIndex],
618
+ other: SupportsFloat | SupportsIndex | datetime.datetime,
619
+ tolerance: SupportsFloat | SupportsIndex | datetime.timedelta | None = ...,
620
+ *,
621
+ rel: SupportsFloat | SupportsIndex | None = ...,
622
+ ) -> _CapableAssertion[_CapableT_co]: ...
623
+ def is_digit(self: _NegatedCapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
624
+ def is_directory(self: _NegatedCapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
625
+ def is_divisible_by(
626
+ self: _NegatedCapableAssertion[int], divisor: SupportsIndex
627
+ ) -> _CapableAssertion[_CapableT_co]: ...
628
+ def is_empty(self) -> _CapableAssertion[_CapableT_co]: ...
629
+ def is_equal_to(self, other: object, **kwargs: object) -> _CapableAssertion[_CapableT_co]: ...
630
+ def is_equal_to_ignoring_case(
631
+ self: _NegatedCapableAssertion[str], other: str
632
+ ) -> _CapableAssertion[_CapableT_co]: ...
633
+ def is_equal_to_ignoring_milliseconds(
634
+ self: _NegatedCapableAssertion[datetime.datetime], other: datetime.datetime
635
+ ) -> _CapableAssertion[_CapableT_co]: ...
636
+ def is_equal_to_ignoring_seconds(
637
+ self: _NegatedCapableAssertion[datetime.datetime], other: datetime.datetime
638
+ ) -> _CapableAssertion[_CapableT_co]: ...
639
+ def is_equal_to_ignoring_time(
640
+ self: _NegatedCapableAssertion[datetime.datetime], other: datetime.datetime
641
+ ) -> _CapableAssertion[_CapableT_co]: ...
642
+ def is_equal_to_ignoring_whitespace(
643
+ self: _NegatedCapableAssertion[str], other: str
644
+ ) -> _CapableAssertion[_CapableT_co]: ...
645
+ def is_even(self: _NegatedCapableAssertion[int]) -> _CapableAssertion[_CapableT_co]: ...
646
+ def is_executable(self: _NegatedCapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
647
+ def is_false(self) -> _CapableAssertion[_CapableT_co]: ...
648
+ def is_file(self: _NegatedCapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
649
+ def is_frame_equal(self, expected: object, **options: Any) -> _CapableAssertion[_CapableT_co]: ...
650
+ def is_greater_than(
651
+ self: _NegatedCapableAssertion[_Orderable], other: object
652
+ ) -> _CapableAssertion[_CapableT_co]: ...
653
+ def is_greater_than_or_equal_to(
654
+ self: _NegatedCapableAssertion[_Orderable], other: object
655
+ ) -> _CapableAssertion[_CapableT_co]: ...
656
+ def is_hex_equal_to(
657
+ self: _NegatedCapableAssertion[bytes | bytearray], expected_hex: str
658
+ ) -> _CapableAssertion[_CapableT_co]: ...
659
+ def is_in(self, *items: object) -> _CapableAssertion[_CapableT_co]: ...
660
+ def is_inf(
661
+ self: _NegatedCapableAssertion[SupportsFloat | SupportsIndex],
662
+ ) -> _CapableAssertion[_CapableT_co]: ...
663
+ def is_iterable(self) -> _CapableAssertion[_CapableT_co]: ...
664
+ def is_length(self, length: SupportsIndex | Matcher[int]) -> _CapableAssertion[_CapableT_co]: ...
665
+ def is_length_between(self, low: SupportsIndex, high: SupportsIndex) -> _CapableAssertion[_CapableT_co]: ...
666
+ def is_less_than(
667
+ self: _NegatedCapableAssertion[_Orderable], other: object
668
+ ) -> _CapableAssertion[_CapableT_co]: ...
669
+ def is_less_than_or_equal_to(
670
+ self: _NegatedCapableAssertion[_Orderable], other: object
671
+ ) -> _CapableAssertion[_CapableT_co]: ...
672
+ def is_lower(self: _NegatedCapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
673
+ def is_named(self: _NegatedCapableAssertion[_PathLike], filename: str) -> _CapableAssertion[_CapableT_co]: ...
674
+ def is_nan(
675
+ self: _NegatedCapableAssertion[SupportsFloat | SupportsIndex],
676
+ ) -> _CapableAssertion[_CapableT_co]: ...
677
+ def is_negative(self: _NegatedCapableAssertion[_Orderable]) -> _CapableAssertion[_CapableT_co]: ...
678
+ def is_none(self) -> _CapableAssertion[_CapableT_co]: ...
679
+ def is_not_between(self, low: object, high: object) -> _CapableAssertion[_CapableT_co]: ...
680
+ def is_not_callable(self) -> _CapableAssertion[_CapableT_co]: ...
681
+ def is_not_close_to(
682
+ self,
683
+ other: SupportsFloat | SupportsIndex | datetime.datetime,
684
+ tolerance: SupportsFloat | SupportsIndex | datetime.timedelta | None = ...,
685
+ *,
686
+ rel: SupportsFloat | SupportsIndex | None = ...,
687
+ ) -> _CapableAssertion[_CapableT_co]: ...
688
+ def is_not_empty(self) -> _CapableAssertion[_CapableT_co]: ...
689
+ def is_not_equal_to(self, other: object) -> _CapableAssertion[_CapableT_co]: ...
690
+ def is_not_in(self, *items: object) -> _CapableAssertion[_CapableT_co]: ...
691
+ def is_not_inf(
692
+ self: _NegatedCapableAssertion[SupportsFloat | SupportsIndex],
693
+ ) -> _CapableAssertion[_CapableT_co]: ...
694
+ def is_not_iterable(self) -> _CapableAssertion[_CapableT_co]: ...
695
+ def is_not_nan(
696
+ self: _NegatedCapableAssertion[SupportsFloat | SupportsIndex],
697
+ ) -> _CapableAssertion[_CapableT_co]: ...
698
+ def is_not_same_as(self, other: object) -> _CapableAssertion[_CapableT_co]: ...
699
+ def is_not_zero(self) -> _CapableAssertion[_CapableT_co]: ...
700
+ def is_odd(self: _NegatedCapableAssertion[int]) -> _CapableAssertion[_CapableT_co]: ...
701
+ def is_positive(self: _NegatedCapableAssertion[_Orderable]) -> _CapableAssertion[_CapableT_co]: ...
702
+ def is_readable(self: _NegatedCapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
703
+ def is_same_as(self, other: object) -> _CapableAssertion[_CapableT_co]: ...
704
+ def is_sorted(
705
+ self, key: Callable[[Any], Any] = ..., reverse: bool = ..., *, allow_empty: bool = ...
706
+ ) -> _CapableAssertion[_CapableT_co]: ...
707
+ def is_subclass_of(self, some_class: ClassInfo) -> _CapableAssertion[_CapableT_co]: ...
708
+ def is_subset_of(self, *supersets: object, allow_empty: bool = ...) -> _CapableAssertion[_CapableT_co]: ...
709
+ def is_true(self) -> _CapableAssertion[_CapableT_co]: ...
710
+ def is_type_of(self, some_type: type) -> _CapableAssertion[_CapableT_co]: ...
711
+ def is_unicode(self) -> _CapableAssertion[_CapableT_co]: ...
712
+ def is_upper(self: _NegatedCapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
713
+ def is_valid_encoding(
714
+ self: _NegatedCapableAssertion[bytes | bytearray], encoding: str
715
+ ) -> _CapableAssertion[_CapableT_co]: ...
716
+ def is_valid_utf8(self: _NegatedCapableAssertion[bytes | bytearray]) -> _CapableAssertion[_CapableT_co]: ...
717
+ def is_whitespace(self: _NegatedCapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
718
+ def is_writable(self: _NegatedCapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
719
+ def is_zero(self) -> _CapableAssertion[_CapableT_co]: ...
720
+ def matches(
721
+ self: _NegatedCapableAssertion[str], pattern: str | re.Pattern[str]
722
+ ) -> _CapableAssertion[_CapableT_co]: ...
723
+ def matches_contract_snapshot(
724
+ self, id: str | None = ..., path: str = ...
725
+ ) -> _CapableAssertion[_CapableT_co]: ...
726
+ def matches_error_tree(self, *expected: type | list[Any]) -> _CapableAssertion[_CapableT_co]: ...
727
+ def matches_inline(
728
+ self,
729
+ expected: object = ...,
730
+ *,
731
+ ignore: object = ...,
732
+ include: object = ...,
733
+ tolerance: float | None = ...,
734
+ rel: float | None = ...,
735
+ comparators: dict[Any, Callable[[Any, Any], Any]] | None = ...,
736
+ placeholders: Mapping[Any, Matcher[Any] | Callable[[Any], object]] | None = ...,
737
+ ) -> _CapableAssertion[_CapableT_co]: ...
738
+ def matches_json_schema(self, schema: dict[str, Any]) -> _CapableAssertion[_CapableT_co]: ...
739
+ def matches_json_schema_from_file(self, path: str | Path) -> _CapableAssertion[_CapableT_co]: ...
740
+ def matches_structure(self, spec: dict[Any, Any]) -> _CapableAssertion[_CapableT_co]: ...
741
+ def matches_with_groups(
742
+ self: _NegatedCapableAssertion[str], pattern: str | re.Pattern[str]
743
+ ) -> _CapableAssertion[_CapableT_co]: ...
744
+ def none_satisfy(self, matcher: Matcher[Any] | Callable[..., bool]) -> _CapableAssertion[_CapableT_co]: ...
745
+ def satisfies_exactly(
746
+ self, *matchers: Matcher[Any] | Callable[..., bool]
747
+ ) -> _CapableAssertion[_CapableT_co]: ...
748
+ def satisfies_exactly_in_any_order(
749
+ self, *matchers: Matcher[Any] | Callable[..., bool]
750
+ ) -> _CapableAssertion[_CapableT_co]: ...
751
+ def snapshot(
752
+ self,
753
+ id: str | None = ...,
754
+ path: str = ...,
755
+ *,
756
+ ignore: object = ...,
757
+ include: object = ...,
758
+ tolerance: float | None = ...,
759
+ rel: float | None = ...,
760
+ comparators: dict[Any, Callable[[Any, Any], Any]] | None = ...,
761
+ placeholders: Mapping[Any, Matcher[Any] | Callable[[Any], object]] | None = ...,
762
+ ) -> _CapableAssertion[_CapableT_co]: ...
763
+ def starts_with(self, prefix: object) -> _CapableAssertion[_CapableT_co]: ...
764
+ def starts_with_bytes(
765
+ self: _NegatedCapableAssertion[bytes | bytearray], prefix: bytes | bytearray
766
+ ) -> _CapableAssertion[_CapableT_co]: ...
767
+ def starts_with_ignoring_case(
768
+ self: _NegatedCapableAssertion[str], prefix: str
769
+ ) -> _CapableAssertion[_CapableT_co]: ...
770
+ def zip_satisfies(
771
+ self, other: Iterable[object], predicate: Callable[..., bool], *, allow_empty: bool = ...
772
+ ) -> _CapableAssertion[_CapableT_co]: ...