assertpy2 2.27.0__tar.gz → 2.28.0__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.
Files changed (267) hide show
  1. {assertpy2-2.27.0 → assertpy2-2.28.0}/CONTRIBUTING.md +14 -0
  2. {assertpy2-2.27.0 → assertpy2-2.28.0}/PKG-INFO +2 -2
  3. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_dangling.py +21 -1
  4. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_builder_check_typing.py +72 -50
  5. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_capable_typing.py +66 -52
  6. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_check_typing.py +32 -22
  7. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_compare.py +343 -89
  8. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_diff.py +79 -40
  9. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_equality.py +108 -36
  10. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_introspection.py +155 -5
  11. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_membership.py +121 -33
  12. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_mixin_base.py +48 -1
  13. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_negated_typing.py +296 -276
  14. assertpy2-2.28.0/assertpy2/_engine/_ordering.py +738 -0
  15. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_poll_typing.py +780 -377
  16. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_require.py +51 -1
  17. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_typing.py +77 -48
  18. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_hints.py +30 -24
  19. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_matcher_impls.py +240 -73
  20. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_satisfies.py +29 -7
  21. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_snapshot_codec.py +100 -6
  22. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/assertpy.py +136 -38
  23. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/async_assertions.py +70 -19
  24. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/base.py +123 -86
  25. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/bytes_mixin.py +14 -12
  26. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/collection.py +23 -26
  27. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/contains.py +64 -42
  28. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/dataframe.py +29 -16
  29. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/date.py +23 -24
  30. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/dict.py +17 -7
  31. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/dynamic.py +19 -9
  32. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/errors.py +3 -0
  33. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/exception.py +77 -8
  34. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/file.py +86 -18
  35. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/helpers.py +97 -19
  36. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/matchers.py +6 -4
  37. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/numeric.py +81 -85
  38. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/pytest_plugin.py +6 -3
  39. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/snapshot.py +20 -5
  40. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/string.py +33 -18
  41. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/warning.py +6 -4
  42. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/concepts/stability.md +17 -7
  43. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/concepts/type-safety.md +10 -8
  44. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/extending/custom-assertions.md +12 -2
  45. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/extending/integrations.md +185 -12
  46. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/getting-started/comparison.md +4 -3
  47. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/getting-started/migration.md +22 -4
  48. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/getting-started/quickstart.md +1 -1
  49. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/guides/assertions.md +73 -7
  50. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/guides/errors.md +18 -5
  51. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/guides/fluent.md +14 -1
  52. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/guides/matchers.md +19 -8
  53. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/guides/testing.md +8 -1
  54. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/index.md +2 -2
  55. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/recipes.md +5 -6
  56. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/core.md +2 -1
  57. assertpy2-2.28.0/docs/reference/dataframes.md +22 -0
  58. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/overview.md +3 -2
  59. {assertpy2-2.27.0 → assertpy2-2.28.0}/mkdocs.yml +1 -1
  60. {assertpy2-2.27.0 → assertpy2-2.28.0}/pyproject.toml +9 -3
  61. {assertpy2-2.27.0 → assertpy2-2.28.0}/scripts/generate_check_protocols.py +5 -0
  62. {assertpy2-2.27.0 → assertpy2-2.28.0}/scripts/generate_poll_protocols.py +320 -36
  63. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/api_snapshot.json +212 -214
  64. assertpy2-2.28.0/tests/chain_corpus.py +337 -0
  65. assertpy2-2.28.0/tests/chain_model.py +633 -0
  66. assertpy2-2.28.0/tests/chain_surfaces.py +226 -0
  67. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/poll_parity_baseline.py +2 -8
  68. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/poll_parity_cases.py +2 -2
  69. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/pyright_baseline.py +17 -7
  70. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_async.py +90 -0
  71. assertpy2-2.28.0/tests/test_attrs_support.py +478 -0
  72. assertpy2-2.28.0/tests/test_call_awaitables.py +163 -0
  73. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_capable_protocol.py +413 -0
  74. assertpy2-2.28.0/tests/test_chain_machine.py +657 -0
  75. assertpy2-2.28.0/tests/test_check.py +324 -0
  76. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_check_protocols.py +6 -3
  77. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_complexity.py +15 -8
  78. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_dangling.py +20 -0
  79. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_dataframe.py +2 -2
  80. assertpy2-2.28.0/tests/test_duality.py +1157 -0
  81. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_dynamic.py +10 -0
  82. assertpy2-2.28.0/tests/test_equality_signals.py +1146 -0
  83. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_equals.py +12 -0
  84. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_evaluation_core.py +569 -12
  85. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_expected_contract.py +33 -2
  86. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_expected_exception.py +381 -1
  87. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_expected_warning.py +34 -0
  88. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_hints.py +85 -8
  89. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_http.py +19 -1
  90. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_in.py +14 -0
  91. assertpy2-2.28.0/tests/test_integer_arguments.py +113 -0
  92. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_matcher_parity.py +14 -1
  93. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_matcher_registry.py +15 -0
  94. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_matchers.py +136 -2
  95. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_not.py +2 -2
  96. assertpy2-2.28.0/tests/test_number_zoo.py +492 -0
  97. assertpy2-2.28.0/tests/test_numbers.py +2140 -0
  98. assertpy2-2.28.0/tests/test_numeric_questions.py +322 -0
  99. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_pin_coverage.py +12 -3
  100. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_poll_protocols.py +157 -18
  101. assertpy2-2.28.0/tests/test_prerequisites.py +376 -0
  102. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_property_attrs.py +43 -1
  103. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_property_based.py +390 -6
  104. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_protocol_parity.py +6 -3
  105. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_public_surface.py +2 -0
  106. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_pytest_plugin.py +35 -7
  107. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_recursive_compare_config.py +171 -14
  108. assertpy2-2.28.0/tests/test_recursive_compare_pydantic.py +466 -0
  109. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_rich_diff.py +7 -10
  110. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_soft.py +25 -1
  111. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_structural.py +47 -0
  112. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_sync_eventually.py +19 -0
  113. assertpy2-2.28.0/tests/test_type.py +311 -0
  114. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_typing.py +158 -19
  115. assertpy2-2.28.0/tests/test_typing_chain_corpus.py +38 -0
  116. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_typing_claims.py +1 -0
  117. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_typing_http.py +21 -1
  118. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_vacuity_contract.py +226 -3
  119. assertpy2-2.28.0/tests/test_verdict_corpus.py +137 -0
  120. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/typing_cases.py +61 -4
  121. assertpy2-2.28.0/tests/typing_chain_corpus_baseline.json +454 -0
  122. assertpy2-2.28.0/tests/typing_http.py +81 -0
  123. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/typing_integrations.py +2 -0
  124. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/typing_integrations_baseline.py +3 -1
  125. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/typing_negative_baseline.py +55 -4
  126. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/typing_promises.py +35 -0
  127. assertpy2-2.28.0/tests/verdict_corpus.py +632 -0
  128. assertpy2-2.28.0/tests/verdict_golden.txt +127 -0
  129. assertpy2-2.27.0/assertpy2/_engine/_ordering.py +0 -170
  130. assertpy2-2.27.0/docs/reference/dataframes.md +0 -5
  131. assertpy2-2.27.0/tests/test_attrs_support.py +0 -170
  132. assertpy2-2.27.0/tests/test_check.py +0 -118
  133. assertpy2-2.27.0/tests/test_numbers.py +0 -880
  134. assertpy2-2.27.0/tests/test_recursive_compare_pydantic.py +0 -83
  135. assertpy2-2.27.0/tests/test_type.py +0 -133
  136. assertpy2-2.27.0/tests/typing_http.py +0 -75
  137. {assertpy2-2.27.0 → assertpy2-2.28.0}/.gitignore +0 -0
  138. {assertpy2-2.27.0 → assertpy2-2.28.0}/LICENSE +0 -0
  139. {assertpy2-2.27.0 → assertpy2-2.28.0}/README.md +0 -0
  140. {assertpy2-2.27.0 → assertpy2-2.28.0}/SECURITY.md +0 -0
  141. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/__init__.py +0 -0
  142. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_clustering.py +0 -0
  143. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/__init__.py +0 -0
  144. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_compat.py +0 -0
  145. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_contract.py +0 -0
  146. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_operations.py +0 -0
  147. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_pairing.py +0 -0
  148. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_path.py +0 -0
  149. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_size.py +0 -0
  150. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_engine/_text.py +0 -0
  151. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/_inline.py +0 -0
  152. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/behave_matchers.py +0 -0
  153. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/extracting.py +0 -0
  154. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/http_mixin.py +0 -0
  155. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/json_mixin.py +0 -0
  156. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/outcome.py +0 -0
  157. {assertpy2-2.27.0 → assertpy2-2.28.0}/assertpy2/py.typed +0 -0
  158. {assertpy2-2.27.0 → assertpy2-2.28.0}/benchmarks/test_perf.py +0 -0
  159. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/assets/diff-equal.png +0 -0
  160. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/assets/diff-equal.svg +0 -0
  161. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/assets/diff-gallery.png +0 -0
  162. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/assets/diff-match.svg +0 -0
  163. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/assets/diff-sequence.svg +0 -0
  164. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/assets/diff-set.svg +0 -0
  165. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/assets/diff-string.svg +0 -0
  166. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/guides/data.md +0 -0
  167. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/logo-dark.svg +0 -0
  168. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/logo.svg +0 -0
  169. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/async.md +0 -0
  170. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/bytes.md +0 -0
  171. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/collections.md +0 -0
  172. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/containment.md +0 -0
  173. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/dates.md +0 -0
  174. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/dicts.md +0 -0
  175. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/dynamic.md +0 -0
  176. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/entry-points.md +0 -0
  177. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/errors.md +0 -0
  178. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/exceptions.md +0 -0
  179. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/extracting.md +0 -0
  180. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/files.md +0 -0
  181. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/http.md +0 -0
  182. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/json.md +0 -0
  183. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/matchers.md +0 -0
  184. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/numbers.md +0 -0
  185. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/snapshots.md +0 -0
  186. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/strings.md +0 -0
  187. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/reference/warnings.md +0 -0
  188. {assertpy2-2.27.0 → assertpy2-2.28.0}/docs/stylesheets/extra.css +0 -0
  189. {assertpy2-2.27.0 → assertpy2-2.28.0}/mkdocs_hooks.py +0 -0
  190. {assertpy2-2.27.0 → assertpy2-2.28.0}/scripts/mutation_report.py +0 -0
  191. {assertpy2-2.27.0 → assertpy2-2.28.0}/scripts/regenerate.py +0 -0
  192. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/api_surface.py +0 -0
  193. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/conftest.py +0 -0
  194. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/docs_fixtures.py +0 -0
  195. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/group_compat.py +0 -0
  196. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_api_compatibility.py +0 -0
  197. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_api_vocabulary.py +0 -0
  198. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_architecture_doc.py +0 -0
  199. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_async_predicates.py +0 -0
  200. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_behave_matchers.py +0 -0
  201. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_bool.py +0 -0
  202. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_boundary_cases.py +0 -0
  203. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_bytes.py +0 -0
  204. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_callable.py +0 -0
  205. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_chaining.py +0 -0
  206. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_class.py +0 -0
  207. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_clustering.py +0 -0
  208. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_collection.py +0 -0
  209. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_core.py +0 -0
  210. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_custom_dict.py +0 -0
  211. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_custom_list.py +0 -0
  212. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_datetime.py +0 -0
  213. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_declared_floors.py +0 -0
  214. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_description.py +0 -0
  215. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_dict.py +0 -0
  216. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_dict_compare.py +0 -0
  217. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_docs_examples.py +0 -0
  218. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_docs_typing.py +0 -0
  219. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_errors.py +0 -0
  220. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_exception_context.py +0 -0
  221. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_extensions.py +0 -0
  222. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_extracting.py +0 -0
  223. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_fail.py +0 -0
  224. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_file.py +0 -0
  225. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_grouped_soft.py +0 -0
  226. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_hostile_values.py +0 -0
  227. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_inline_record.py +0 -0
  228. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_inline_snapshot.py +0 -0
  229. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_iterable_cluster.py +0 -0
  230. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_json.py +0 -0
  231. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_list.py +0 -0
  232. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_match_result.py +0 -0
  233. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_message_elision.py +0 -0
  234. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_namedtuple.py +0 -0
  235. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_negated_protocols.py +0 -0
  236. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_none.py +0 -0
  237. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_openapi_contract.py +0 -0
  238. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_operation_contract.py +0 -0
  239. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_optional_integration_contracts.py +0 -0
  240. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_overload_order.py +0 -0
  241. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_overloads.py +0 -0
  242. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_pipeline.py +0 -0
  243. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_poll_parity.py +0 -0
  244. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_pyright_baseline.py +0 -0
  245. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_recursive_assertion.py +0 -0
  246. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_recursive_compare.py +0 -0
  247. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_recursive_compare_attrs.py +0 -0
  248. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_refusals.py +0 -0
  249. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_regex_groups.py +0 -0
  250. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_requirement.py +0 -0
  251. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_same_as.py +0 -0
  252. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_satisfy.py +0 -0
  253. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_skip_guard.py +0 -0
  254. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_snapshots.py +0 -0
  255. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_soft_fail.py +0 -0
  256. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_string.py +0 -0
  257. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_surface_conformance.py +0 -0
  258. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_traceback.py +0 -0
  259. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_type_expression_failures.py +0 -0
  260. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_typing_completeness.py +0 -0
  261. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_typing_conformance.py +0 -0
  262. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_typing_from_a_wheel.py +0 -0
  263. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_typing_integrations.py +0 -0
  264. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_typing_negative.py +0 -0
  265. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_typing_promises.py +0 -0
  266. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/test_warn.py +0 -0
  267. {assertpy2-2.27.0 → assertpy2-2.28.0}/tests/typing_harness.py +0 -0
@@ -114,6 +114,20 @@ change. The baseline test passes the same target itself, so it gives one answer
114
114
  - `tests/test_docs_examples.py` is run separately because it executes the snippets in `docs/`, which
115
115
  needs the `docs-examples` group and a different collection.
116
116
 
117
+ ### When a gate says an answer moved
118
+
119
+ Two gates record what the library currently decides rather than what it should. Both fail on a change
120
+ and neither is a failure to paper over: read the diff, decide whether the change is meant to ship, then
121
+ re-record it in the same commit so the diff carries the decision into review.
122
+
123
+ ```bash
124
+ ASSERTPY2_UPDATE_API=1 uv run pytest tests/test_api_compatibility.py # the public surface
125
+ ASSERTPY2_UPDATE_VERDICTS=1 uv run pytest tests/test_verdict_corpus.py # what each input decides
126
+ ```
127
+
128
+ The second one's diff is the draft of the release's Behaviour changes section, so read it before
129
+ writing that section rather than after.
130
+
117
131
  ## Commit style
118
132
 
119
133
  Use [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`, `refactor:`, `test:`, `docs:`, `chore:`, etc.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: assertpy2
3
- Version: 2.27.0
4
- Summary: Fluent assertion library for Python with composable matchers, structural matching, and full type safety
3
+ Version: 2.28.0
4
+ Summary: Fluent, fully typed assertion library for Python: your type checker sees only the assertions that fit the value, and every failure carries a structured diff. Soft assertions, polling, inline snapshots, OpenAPI contracts.
5
5
  Project-URL: Homepage, https://github.com/Solganis/assertpy2
6
6
  Project-URL: Repository, https://github.com/Solganis/assertpy2
7
7
  Project-URL: Issues, https://github.com/Solganis/assertpy2/issues
@@ -40,7 +40,7 @@ from __future__ import annotations
40
40
  import ast
41
41
  import io
42
42
  import tokenize
43
- from typing import Final, NamedTuple
43
+ from typing import TYPE_CHECKING, Final, NamedTuple
44
44
 
45
45
  from ._engine._operations import (
46
46
  ALSO_ASSERTS,
@@ -52,6 +52,9 @@ from ._engine._operations import (
52
52
  WITHOUT_A_VERDICT,
53
53
  )
54
54
 
55
+ if TYPE_CHECKING:
56
+ import pathlib
57
+
55
58
  __tracebackhide__ = True
56
59
 
57
60
  # the builder factories and only those: everything else either asserts by itself or is not an entry point
@@ -440,6 +443,23 @@ def _silenced(statement: ast.stmt, marked: frozenset[int]) -> bool:
440
443
  return any(line in marked for line in range(statement.lineno, last + 1))
441
444
 
442
445
 
446
+ def read_module(path: pathlib.Path) -> str:
447
+ """A test module's text as the interpreter decodes it, which is what `findings` reads.
448
+
449
+ The encoding a PEP 263 cookie or a BOM declares, found the way `tokenize` finds it, and UTF-8 where
450
+ none is declared. A byte that still does not decode is replaced rather than refused: 3.10 to 3.13
451
+ import a module whose comment is not UTF-8, and reading it strictly aborted a whole run from the
452
+ collection hook. A comment's text is not something the check reads.
453
+ """
454
+ data = path.read_bytes()
455
+ try:
456
+ encoding = tokenize.detect_encoding(io.BytesIO(data).readline)[0]
457
+ except SyntaxError:
458
+ # a first line that is not UTF-8 and names no encoding, which 3.10 to 3.13 import all the same
459
+ encoding = "utf-8"
460
+ return data.decode(encoding, errors="replace")
461
+
462
+
443
463
  def findings(source: str, path: str, extra_entries: frozenset[str] = frozenset()) -> list[Finding]:
444
464
  """Report the offending statements in one module's source.
445
465
 
@@ -272,7 +272,15 @@ if TYPE_CHECKING:
272
272
  *items: _E | Matcher[_E],
273
273
  ) -> AssertionOutcome: ...
274
274
  @overload
275
- def does_not_contain(self: _CheckAnyValue[_CapableT], *items: str | Matcher[str]) -> AssertionOutcome: ...
275
+ def does_not_contain(
276
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], *items: object
277
+ ) -> AssertionOutcome: ...
278
+ @overload
279
+ def does_not_contain(
280
+ self: _CheckAnyValue[_FrameT_co] | _CheckAnyValue[_ArrayT_co], *items: object
281
+ ) -> AssertionOutcome: ...
282
+ @overload
283
+ def does_not_contain(self: _CheckAnyValue[_CapableT], *items: object) -> AssertionOutcome: ...
276
284
 
277
285
  @overload
278
286
  def contains_only(self: _CheckAnyValue[str], *items: str | Matcher[str]) -> AssertionOutcome: ...
@@ -709,10 +717,10 @@ if TYPE_CHECKING:
709
717
  | _CheckAnyValue[bytearray]
710
718
  | _CheckAnyValue[_FrameT_co]
711
719
  | _CheckAnyValue[_ArrayT_co],
712
- size: int,
720
+ size: SupportsIndex,
713
721
  ) -> AssertionOutcome: ...
714
722
  @overload
715
- def has_size_greater_than(self: _CheckAnyValue[_CapableT], size: int) -> AssertionOutcome: ...
723
+ def has_size_greater_than(self: _CheckAnyValue[_CapableT], size: SupportsIndex) -> AssertionOutcome: ...
716
724
 
717
725
  @overload
718
726
  def has_size_less_than(
@@ -726,10 +734,10 @@ if TYPE_CHECKING:
726
734
  | _CheckAnyValue[bytearray]
727
735
  | _CheckAnyValue[_FrameT_co]
728
736
  | _CheckAnyValue[_ArrayT_co],
729
- size: int,
737
+ size: SupportsIndex,
730
738
  ) -> AssertionOutcome: ...
731
739
  @overload
732
- def has_size_less_than(self: _CheckAnyValue[_CapableT], size: int) -> AssertionOutcome: ...
740
+ def has_size_less_than(self: _CheckAnyValue[_CapableT], size: SupportsIndex) -> AssertionOutcome: ...
733
741
 
734
742
  @overload
735
743
  def has_size_between(
@@ -743,11 +751,13 @@ if TYPE_CHECKING:
743
751
  | _CheckAnyValue[bytearray]
744
752
  | _CheckAnyValue[_FrameT_co]
745
753
  | _CheckAnyValue[_ArrayT_co],
746
- low: int,
747
- high: int,
754
+ low: SupportsIndex,
755
+ high: SupportsIndex,
748
756
  ) -> AssertionOutcome: ...
749
757
  @overload
750
- def has_size_between(self: _CheckAnyValue[_CapableT], low: int, high: int) -> AssertionOutcome: ...
758
+ def has_size_between(
759
+ self: _CheckAnyValue[_CapableT], low: SupportsIndex, high: SupportsIndex
760
+ ) -> AssertionOutcome: ...
751
761
 
752
762
  @overload
753
763
  def is_empty(
@@ -820,46 +830,16 @@ if TYPE_CHECKING:
820
830
  def is_not_inf(self: _CheckAnyValue[SupportsFloat | SupportsIndex]) -> AssertionOutcome: ...
821
831
 
822
832
  @overload
823
- def is_close_to(
824
- self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], other: _Number, tolerance: _Number
825
- ) -> AssertionOutcome: ...
826
- @overload
827
- def is_close_to(
828
- self: _CheckAnyValue[datetime.datetime], other: datetime.datetime, tolerance: datetime.timedelta
829
- ) -> AssertionOutcome: ...
830
- @overload
831
- def is_close_to(
832
- self: _CheckAnyValue[SupportsFloat | SupportsIndex],
833
- other: SupportsFloat | SupportsIndex,
834
- tolerance: SupportsFloat | SupportsIndex,
835
- ) -> AssertionOutcome: ...
836
- @overload
837
- def is_close_to(
838
- self: _CheckAnyValue[SupportsFloat | SupportsIndex], other: _Number, tolerance: _Number
839
- ) -> AssertionOutcome: ...
840
-
841
- @overload
842
- def is_not_close_to(
843
- self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], other: _Number, tolerance: _Number
844
- ) -> AssertionOutcome: ...
845
- @overload
846
- def is_not_close_to(
847
- self: _CheckAnyValue[datetime.datetime], other: datetime.datetime, tolerance: datetime.timedelta
848
- ) -> AssertionOutcome: ...
849
- @overload
850
- def is_not_close_to(
851
- self: _CheckAnyValue[SupportsFloat | SupportsIndex],
852
- other: SupportsFloat | SupportsIndex,
853
- tolerance: SupportsFloat | SupportsIndex,
833
+ def is_not_between(
834
+ self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], low: _Number, high: _Number
854
835
  ) -> AssertionOutcome: ...
855
836
  @overload
856
- def is_not_close_to(
857
- self: _CheckAnyValue[_CapableT], other: _Number, tolerance: _Number
837
+ def is_not_between(
838
+ self: _CheckAnyValue[datetime.datetime], low: datetime.datetime, high: datetime.datetime
858
839
  ) -> AssertionOutcome: ...
859
-
860
840
  @overload
861
841
  def is_not_between(
862
- self: _CheckAnyValue[bool] | _CheckAnyValue[int] | _CheckAnyValue[float], low: _Number, high: _Number
842
+ self: _CheckAnyValue[datetime.date], low: datetime.date, high: datetime.date
863
843
  ) -> AssertionOutcome: ...
864
844
  @overload
865
845
  def is_not_between(self: _CheckAnyValue[_T], low: Any, high: Any) -> AssertionOutcome: ...
@@ -901,6 +881,44 @@ if TYPE_CHECKING:
901
881
  @overload
902
882
  def is_not_zero(self: _CheckAnyValue[_CapableT]) -> AssertionOutcome: ...
903
883
 
884
+ @overload
885
+ def is_close_to(
886
+ self: _CheckAnyValue[int] | _CheckAnyValue[float], other: _Number, tolerance: _Number
887
+ ) -> AssertionOutcome: ...
888
+ @overload
889
+ def is_close_to(
890
+ self: _CheckAnyValue[datetime.datetime], other: datetime.datetime, tolerance: datetime.timedelta
891
+ ) -> AssertionOutcome: ...
892
+ @overload
893
+ def is_close_to(
894
+ self: _CheckAnyValue[SupportsFloat | SupportsIndex],
895
+ other: SupportsFloat | SupportsIndex,
896
+ tolerance: SupportsFloat | SupportsIndex,
897
+ ) -> AssertionOutcome: ...
898
+ @overload
899
+ def is_close_to(
900
+ self: _CheckAnyValue[SupportsFloat | SupportsIndex], other: _Number, tolerance: _Number
901
+ ) -> AssertionOutcome: ...
902
+
903
+ @overload
904
+ def is_not_close_to(
905
+ self: _CheckAnyValue[int] | _CheckAnyValue[float], other: _Number, tolerance: _Number
906
+ ) -> AssertionOutcome: ...
907
+ @overload
908
+ def is_not_close_to(
909
+ self: _CheckAnyValue[datetime.datetime], other: datetime.datetime, tolerance: datetime.timedelta
910
+ ) -> AssertionOutcome: ...
911
+ @overload
912
+ def is_not_close_to(
913
+ self: _CheckAnyValue[SupportsFloat | SupportsIndex],
914
+ other: SupportsFloat | SupportsIndex,
915
+ tolerance: SupportsFloat | SupportsIndex,
916
+ ) -> AssertionOutcome: ...
917
+ @overload
918
+ def is_not_close_to(
919
+ self: _CheckAnyValue[_CapableT], other: _Number, tolerance: _Number
920
+ ) -> AssertionOutcome: ...
921
+
904
922
  @overload
905
923
  def is_even(self: _CheckAnyValue[int] | _CheckAnyValue[float]) -> AssertionOutcome: ...
906
924
  @overload
@@ -912,9 +930,11 @@ if TYPE_CHECKING:
912
930
  def is_odd(self: _CheckAnyValue[int]) -> AssertionOutcome: ...
913
931
 
914
932
  @overload
915
- def is_divisible_by(self: _CheckAnyValue[int] | _CheckAnyValue[float], divisor: int) -> AssertionOutcome: ...
933
+ def is_divisible_by(
934
+ self: _CheckAnyValue[int] | _CheckAnyValue[float], divisor: SupportsIndex
935
+ ) -> AssertionOutcome: ...
916
936
  @overload
917
- def is_divisible_by(self: _CheckAnyValue[int], divisor: int) -> AssertionOutcome: ...
937
+ def is_divisible_by(self: _CheckAnyValue[int], divisor: SupportsIndex) -> AssertionOutcome: ...
918
938
 
919
939
  @overload
920
940
  def contains_key(self: _CheckAnyValue[dict[_K, _V]], *keys: _K | Matcher[_K]) -> AssertionOutcome: ...
@@ -1090,10 +1110,12 @@ if TYPE_CHECKING:
1090
1110
 
1091
1111
  @overload
1092
1112
  def has_byte_at(
1093
- self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], index: int, expected: int
1113
+ self: _CheckAnyValue[bytes] | _CheckAnyValue[bytearray], index: SupportsIndex, expected: SupportsIndex
1094
1114
  ) -> AssertionOutcome: ...
1095
1115
  @overload
1096
- def has_byte_at(self: _CheckAnyValue[bytes | bytearray], index: int, expected: int) -> AssertionOutcome: ...
1116
+ def has_byte_at(
1117
+ self: _CheckAnyValue[bytes | bytearray], index: SupportsIndex, expected: SupportsIndex
1118
+ ) -> AssertionOutcome: ...
1097
1119
 
1098
1120
  @overload
1099
1121
  def is_hex_equal_to(
@@ -1248,11 +1270,11 @@ if TYPE_CHECKING:
1248
1270
 
1249
1271
  def is_type_of(self, some_type: type) -> AssertionOutcome: ...
1250
1272
 
1251
- def is_subclass_of(self, some_class: type) -> AssertionOutcome: ...
1273
+ def is_subclass_of(self, some_class: ClassInfo) -> AssertionOutcome: ...
1252
1274
 
1253
- def is_length(self, length: int) -> AssertionOutcome: ...
1275
+ def is_length(self, length: SupportsIndex) -> AssertionOutcome: ...
1254
1276
 
1255
- def is_length_between(self, low: int, high: int) -> AssertionOutcome: ...
1277
+ def is_length_between(self, low: SupportsIndex, high: SupportsIndex) -> AssertionOutcome: ...
1256
1278
 
1257
1279
  def is_callable(self) -> AssertionOutcome: ...
1258
1280
 
@@ -35,8 +35,19 @@ if TYPE_CHECKING:
35
35
  from ..matchers import Matcher
36
36
  from ._builder_check_typing import _CheckAnyValue
37
37
  from ._compat import Self
38
- from ._poll_typing import _AsyncPoll, _SyncPoll
39
- from ._typing import _E, _K, _R, _U, _V
38
+ from ._poll_typing import _AsyncPoll, _NoExpectationOnAChain, _SyncPoll
39
+ from ._typing import (
40
+ _E,
41
+ _K,
42
+ _R,
43
+ _U,
44
+ _V,
45
+ _ExpectedCompletionAssertion,
46
+ _ExpectedRaiseAssertion,
47
+ _ExpectedWarningAssertion,
48
+ _Landed,
49
+ _ListAssertion,
50
+ )
40
51
 
41
52
  # covariant: the façade only ever hands the subject back, through `value`
42
53
  _CapableT_co = TypeVar("_CapableT_co", covariant=True)
@@ -158,11 +169,11 @@ if TYPE_CHECKING:
158
169
  @overload
159
170
  def last(self) -> Self: ...
160
171
  @overload
161
- def element(self: _CapableAssertion[Mapping[_K, _V]], index: int) -> AssertionBuilder[_K]: ...
172
+ def element(self: _CapableAssertion[Mapping[_K, _V]], index: SupportsIndex) -> AssertionBuilder[_K]: ...
162
173
  @overload
163
- def element(self: _ElementSource[_E], index: int) -> AssertionBuilder[_E]: ...
174
+ def element(self: _ElementSource[_E], index: SupportsIndex) -> AssertionBuilder[_E]: ...
164
175
  @overload
165
- def element(self, index: int) -> Self: ...
176
+ def element(self, index: SupportsIndex) -> Self: ...
166
177
  @overload
167
178
  def mapped(self: _ElementSource[_E], func: Callable[[_E], _R]) -> AssertionBuilder[list[_R]]: ...
168
179
  @overload
@@ -194,6 +205,21 @@ if TYPE_CHECKING:
194
205
  ignoring: type[Exception] | tuple[type[Exception], ...] = ...,
195
206
  trace: bool = ...,
196
207
  ) -> _SyncPoll[Any]: ...
208
+ # where the callable view lands: flattened, the runtime's `-> Self` kept a caught message typed as the callable
209
+ @overload
210
+ def raises(self: _CapableAssertion[_Callable], ex: type[_Landed]) -> _ExpectedRaiseAssertion[Any, _Landed]: ...
211
+ @overload
212
+ def raises(self: _CapableAssertion[_Callable], ex: type) -> _ExpectedRaiseAssertion[Any, BaseException]: ...
213
+ def does_not_raise(self: _CapableAssertion[_Callable], ex: type) -> _ExpectedCompletionAssertion[Any]: ...
214
+ def warns(
215
+ self: _CapableAssertion[_Callable], warning: type[Warning] = ...
216
+ ) -> _ExpectedWarningAssertion[Any]: ...
217
+ def does_not_warn(
218
+ self: _CapableAssertion[_Callable], warning: type[Warning] = ...
219
+ ) -> _ExpectedCompletionAssertion[Any]: ...
220
+
221
+ when_called_with: _NoExpectationOnAChain
222
+
197
223
  # the builder's own helpers: left to `__getattr__`, `builder()` read as this facade over the value already here
198
224
  def builder(
199
225
  self,
@@ -220,8 +246,8 @@ if TYPE_CHECKING:
220
246
  ) -> Self: ...
221
247
  def all_satisfy(self, matcher: Matcher[Any] | Callable[..., bool], *, allow_empty: bool = ...) -> Self: ...
222
248
  def any_satisfy(self, matcher: Matcher[Any] | Callable[..., bool]) -> Self: ...
223
- def at_json_path(self, path: str) -> Self: ...
224
- def caused_by(self, ex: type) -> Self: ...
249
+ def at_json_path(self, path: str) -> AssertionBuilder[Any]: ...
250
+ def caused_by(self, ex: ClassInfo) -> AssertionBuilder[Any]: ...
225
251
  def conforms_to_openapi(
226
252
  self,
227
253
  spec: dict[str, Any],
@@ -255,9 +281,7 @@ if TYPE_CHECKING:
255
281
  def contains_value(
256
282
  self: _CapableAssertion[_KeyedWithValues], *values: object
257
283
  ) -> _CapableAssertion[_CapableT_co]: ...
258
- def decoded_as(
259
- self: _CapableAssertion[bytes | bytearray], encoding: str = ...
260
- ) -> _CapableAssertion[_CapableT_co]: ...
284
+ def decoded_as(self: _CapableAssertion[bytes | bytearray], encoding: str = ...) -> AssertionBuilder[Any]: ...
261
285
  def decoded_as_json(self) -> AssertionBuilder[object]: ...
262
286
  def described_as(self, description: str) -> Self: ...
263
287
  def does_not_contain(self, *items: object) -> Self: ...
@@ -273,32 +297,28 @@ if TYPE_CHECKING:
273
297
  def does_not_exist(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
274
298
  def does_not_have_json_path(self, path: str) -> Self: ...
275
299
  def does_not_match(self: _CapableAssertion[str], pattern: str) -> _CapableAssertion[_CapableT_co]: ...
276
- def does_not_raise(self: _CapableAssertion[_Callable], ex: type) -> _CapableAssertion[_CapableT_co]: ...
277
- def does_not_warn(
278
- self: _CapableAssertion[_Callable], warning: type[Warning] = ...
279
- ) -> _CapableAssertion[_CapableT_co]: ...
280
300
  def each(self, matcher: Matcher[Any] | Callable[..., bool], *, allow_empty: bool = ...) -> Self: ...
281
301
  def ends_with(self, suffix: object) -> Self: ...
282
302
  def ends_with_ignoring_case(self: _CapableAssertion[str], suffix: str) -> _CapableAssertion[_CapableT_co]: ...
283
- def error_of(self, ex: type) -> Self: ...
284
- def errors(self) -> Self: ...
303
+ def error_of(self, ex: type) -> AssertionBuilder[Any]: ...
304
+ def errors(self) -> AssertionBuilder[Any]: ...
285
305
  def exists(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
286
- def extracting(self, *names: object, **kwargs: object) -> Self: ...
306
+ def extracting(self, *names: object, **kwargs: object) -> _ListAssertion[Any]: ...
287
307
  def extracting_group(
288
308
  self: _CapableAssertion[str], pattern: str, group: int | str = ...
289
- ) -> _CapableAssertion[_CapableT_co]: ...
290
- def filtered_on(self, predicate: Matcher[Any] | Callable[[Any], bool]) -> Self: ...
291
- def flat_mapped(self, func: Callable[[Any], Iterable[Any]]) -> Self: ...
309
+ ) -> AssertionBuilder[Any]: ...
310
+ def filtered_on(self, predicate: Matcher[Any] | Callable[[Any], bool]) -> _ListAssertion[Any]: ...
311
+ def flat_mapped(self, func: Callable[[Any], Iterable[Any]]) -> _ListAssertion[Any]: ...
292
312
  def has_byte_at(
293
- self: _CapableAssertion[bytes | bytearray], index: int, expected: int
313
+ self: _CapableAssertion[bytes | bytearray], index: SupportsIndex, expected: SupportsIndex
294
314
  ) -> _CapableAssertion[_CapableT_co]: ...
295
315
  def has_json_path(self, path: str) -> Self: ...
296
316
  def has_no_none_fields(self, *, allow_empty: bool = ...) -> Self: ...
297
- def has_root_cause(self, ex: type) -> Self: ...
317
+ def has_root_cause(self, ex: ClassInfo) -> AssertionBuilder[Any]: ...
298
318
  def has_same_size_as(self, other: Sized) -> Self: ...
299
- def has_size_between(self, low: int, high: int) -> Self: ...
300
- def has_size_greater_than(self, size: int) -> Self: ...
301
- def has_size_less_than(self, size: int) -> Self: ...
319
+ def has_size_between(self, low: SupportsIndex, high: SupportsIndex) -> Self: ...
320
+ def has_size_greater_than(self, size: SupportsIndex) -> Self: ...
321
+ def has_size_less_than(self, size: SupportsIndex) -> Self: ...
302
322
  def is_after(
303
323
  self: _CapableAssertion[datetime.datetime], other: datetime.datetime
304
324
  ) -> _CapableAssertion[_CapableT_co]: ...
@@ -327,7 +347,9 @@ if TYPE_CHECKING:
327
347
  ) -> _CapableAssertion[_CapableT_co]: ...
328
348
  def is_digit(self: _CapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
329
349
  def is_directory(self: _CapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
330
- def is_divisible_by(self: _CapableAssertion[int], divisor: int) -> _CapableAssertion[_CapableT_co]: ...
350
+ def is_divisible_by(
351
+ self: _CapableAssertion[int], divisor: SupportsIndex
352
+ ) -> _CapableAssertion[_CapableT_co]: ...
331
353
  def is_empty(self) -> Self: ...
332
354
  def is_equal_to(self, other: object, **kwargs: object) -> Self: ...
333
355
  def is_equal_to_ignoring_case(self: _CapableAssertion[str], other: str) -> _CapableAssertion[_CapableT_co]: ...
@@ -358,8 +380,8 @@ if TYPE_CHECKING:
358
380
  def is_in(self, *items: object) -> Self: ...
359
381
  def is_inf(self: _CapableAssertion[SupportsFloat | SupportsIndex]) -> _CapableAssertion[_CapableT_co]: ...
360
382
  def is_iterable(self) -> Self: ...
361
- def is_length(self, length: int) -> Self: ...
362
- def is_length_between(self, low: int, high: int) -> Self: ...
383
+ def is_length(self, length: SupportsIndex) -> Self: ...
384
+ def is_length_between(self, low: SupportsIndex, high: SupportsIndex) -> Self: ...
363
385
  def is_less_than(self: _CapableAssertion[_Orderable], other: object) -> _CapableAssertion[_CapableT_co]: ...
364
386
  def is_less_than_or_equal_to(
365
387
  self: _CapableAssertion[_Orderable], other: object
@@ -391,7 +413,7 @@ if TYPE_CHECKING:
391
413
  def is_sorted(
392
414
  self, key: Callable[[Any], Any] = ..., reverse: bool = ..., *, allow_empty: bool = ...
393
415
  ) -> Self: ...
394
- def is_subclass_of(self, some_class: type) -> Self: ...
416
+ def is_subclass_of(self, some_class: ClassInfo) -> Self: ...
395
417
  def is_subset_of(self, *supersets: object, allow_empty: bool = ...) -> Self: ...
396
418
  def is_true(self) -> Self: ...
397
419
  def is_type_of(self, some_type: type) -> Self: ...
@@ -420,11 +442,10 @@ if TYPE_CHECKING:
420
442
  def matches_json_schema(self, schema: dict[str, Any]) -> Self: ...
421
443
  def matches_json_schema_from_file(self, path: str | Path) -> Self: ...
422
444
  def matches_structure(self, spec: dict[Any, Any]) -> Self: ...
423
- def matches_with_groups(self: _CapableAssertion[str], pattern: str) -> _CapableAssertion[_CapableT_co]: ...
445
+ def matches_with_groups(self: _CapableAssertion[str], pattern: str) -> AssertionBuilder[Any]: ...
424
446
  def none_satisfy(self, matcher: Matcher[Any] | Callable[..., bool]) -> Self: ...
425
- def raised(self) -> Self: ...
426
- def raises(self: _CapableAssertion[_Callable], ex: type) -> _CapableAssertion[_CapableT_co]: ...
427
- def returned(self) -> Self: ...
447
+ def raised(self) -> AssertionBuilder[Any]: ...
448
+ def returned(self) -> AssertionBuilder[Any]: ...
428
449
  def satisfies_exactly(self, *matchers: Matcher[Any] | Callable[..., bool]) -> Self: ...
429
450
  def satisfies_exactly_in_any_order(self, *matchers: Matcher[Any] | Callable[..., bool]) -> Self: ...
430
451
  def snapshot(
@@ -443,12 +464,6 @@ if TYPE_CHECKING:
443
464
  self: _CapableAssertion[bytes | bytearray], prefix: bytes | bytearray
444
465
  ) -> _CapableAssertion[_CapableT_co]: ...
445
466
  def starts_with_ignoring_case(self: _CapableAssertion[str], prefix: str) -> _CapableAssertion[_CapableT_co]: ...
446
- def warns(
447
- self: _CapableAssertion[_Callable], warning: type[Warning] = ...
448
- ) -> _CapableAssertion[_CapableT_co]: ...
449
- def when_called_with(
450
- self: _CapableAssertion[_Callable], *some_args: object, **some_kwargs: object
451
- ) -> _CapableAssertion[_CapableT_co]: ...
452
467
  def zip_satisfies(
453
468
  self, other: Iterable[object], predicate: Callable[..., bool], *, allow_empty: bool = ...
454
469
  ) -> Self: ...
@@ -483,7 +498,7 @@ if TYPE_CHECKING:
483
498
  self, matcher: Matcher[Any] | Callable[..., bool], *, allow_empty: bool = ...
484
499
  ) -> _CapableAssertion[_CapableT_co]: ...
485
500
  def any_satisfy(self, matcher: Matcher[Any] | Callable[..., bool]) -> _CapableAssertion[_CapableT_co]: ...
486
- def caused_by(self, ex: type) -> _CapableAssertion[_CapableT_co]: ...
501
+ def caused_by(self, ex: ClassInfo) -> _CapableAssertion[_CapableT_co]: ...
487
502
  def conforms_to_openapi(
488
503
  self,
489
504
  spec: dict[str, Any],
@@ -545,15 +560,15 @@ if TYPE_CHECKING:
545
560
  self: _NegatedCapableAssertion[str], pattern: str, group: int | str = ...
546
561
  ) -> _CapableAssertion[_CapableT_co]: ...
547
562
  def has_byte_at(
548
- self: _NegatedCapableAssertion[bytes | bytearray], index: int, expected: int
563
+ self: _NegatedCapableAssertion[bytes | bytearray], index: SupportsIndex, expected: SupportsIndex
549
564
  ) -> _CapableAssertion[_CapableT_co]: ...
550
565
  def has_json_path(self, path: str) -> _CapableAssertion[_CapableT_co]: ...
551
566
  def has_no_none_fields(self, *, allow_empty: bool = ...) -> _CapableAssertion[_CapableT_co]: ...
552
- def has_root_cause(self, ex: type) -> _CapableAssertion[_CapableT_co]: ...
567
+ def has_root_cause(self, ex: ClassInfo) -> _CapableAssertion[_CapableT_co]: ...
553
568
  def has_same_size_as(self, other: Sized) -> _CapableAssertion[_CapableT_co]: ...
554
- def has_size_between(self, low: int, high: int) -> _CapableAssertion[_CapableT_co]: ...
555
- def has_size_greater_than(self, size: int) -> _CapableAssertion[_CapableT_co]: ...
556
- def has_size_less_than(self, size: int) -> _CapableAssertion[_CapableT_co]: ...
569
+ def has_size_between(self, low: SupportsIndex, high: SupportsIndex) -> _CapableAssertion[_CapableT_co]: ...
570
+ def has_size_greater_than(self, size: SupportsIndex) -> _CapableAssertion[_CapableT_co]: ...
571
+ def has_size_less_than(self, size: SupportsIndex) -> _CapableAssertion[_CapableT_co]: ...
557
572
  def is_after(
558
573
  self: _NegatedCapableAssertion[datetime.datetime], other: datetime.datetime
559
574
  ) -> _CapableAssertion[_CapableT_co]: ...
@@ -584,7 +599,9 @@ if TYPE_CHECKING:
584
599
  ) -> _CapableAssertion[_CapableT_co]: ...
585
600
  def is_digit(self: _NegatedCapableAssertion[str]) -> _CapableAssertion[_CapableT_co]: ...
586
601
  def is_directory(self: _NegatedCapableAssertion[_PathLike]) -> _CapableAssertion[_CapableT_co]: ...
587
- def is_divisible_by(self: _NegatedCapableAssertion[int], divisor: int) -> _CapableAssertion[_CapableT_co]: ...
602
+ def is_divisible_by(
603
+ self: _NegatedCapableAssertion[int], divisor: SupportsIndex
604
+ ) -> _CapableAssertion[_CapableT_co]: ...
588
605
  def is_empty(self) -> _CapableAssertion[_CapableT_co]: ...
589
606
  def is_equal_to(self, other: object, **kwargs: object) -> _CapableAssertion[_CapableT_co]: ...
590
607
  def is_equal_to_ignoring_case(
@@ -621,8 +638,8 @@ if TYPE_CHECKING:
621
638
  self: _NegatedCapableAssertion[SupportsFloat | SupportsIndex],
622
639
  ) -> _CapableAssertion[_CapableT_co]: ...
623
640
  def is_iterable(self) -> _CapableAssertion[_CapableT_co]: ...
624
- def is_length(self, length: int) -> _CapableAssertion[_CapableT_co]: ...
625
- def is_length_between(self, low: int, high: int) -> _CapableAssertion[_CapableT_co]: ...
641
+ def is_length(self, length: SupportsIndex) -> _CapableAssertion[_CapableT_co]: ...
642
+ def is_length_between(self, low: SupportsIndex, high: SupportsIndex) -> _CapableAssertion[_CapableT_co]: ...
626
643
  def is_less_than(
627
644
  self: _NegatedCapableAssertion[_Orderable], other: object
628
645
  ) -> _CapableAssertion[_CapableT_co]: ...
@@ -662,7 +679,7 @@ if TYPE_CHECKING:
662
679
  def is_sorted(
663
680
  self, key: Callable[[Any], Any] = ..., reverse: bool = ..., *, allow_empty: bool = ...
664
681
  ) -> _CapableAssertion[_CapableT_co]: ...
665
- def is_subclass_of(self, some_class: type) -> _CapableAssertion[_CapableT_co]: ...
682
+ def is_subclass_of(self, some_class: ClassInfo) -> _CapableAssertion[_CapableT_co]: ...
666
683
  def is_subset_of(self, *supersets: object, allow_empty: bool = ...) -> _CapableAssertion[_CapableT_co]: ...
667
684
  def is_true(self) -> _CapableAssertion[_CapableT_co]: ...
668
685
  def is_type_of(self, some_type: type) -> _CapableAssertion[_CapableT_co]: ...
@@ -721,9 +738,6 @@ if TYPE_CHECKING:
721
738
  def starts_with_ignoring_case(
722
739
  self: _NegatedCapableAssertion[str], prefix: str
723
740
  ) -> _CapableAssertion[_CapableT_co]: ...
724
- def when_called_with(
725
- self: _NegatedCapableAssertion[_Callable], *some_args: object, **some_kwargs: object
726
- ) -> _CapableAssertion[_CapableT_co]: ...
727
741
  def zip_satisfies(
728
742
  self, other: Iterable[object], predicate: Callable[..., bool], *, allow_empty: bool = ...
729
743
  ) -> _CapableAssertion[_CapableT_co]: ...