.3493624936399236:b7404d45aa80f3721d9cf7a6f2e3d0e9_69f1ded19838cf54136eafe3.69f1dfad9838cf54136eafe6.69f1dfad6b3aba23f986e7ef:Trae CN.T(2026/4/29 18:38:37)#14428
Closed
muyusajiangtian wants to merge 2 commits intopytest-dev:mainfrom
Conversation
添加递归查找第一个差异路径的功能,并在断言失败时显示结构化差异信息,包括差异路径、期望值和实际值。同时更新相关测试用例以验证新功能。 新增 `_find_first_diff_path` 函数递归查找字典和列表中的第一个差异,并返回路径和差异值。在 `assertrepr_compare` 中为字典和列表类型的 == 断言添加结构化差异信息。测试用例验证了简单字典、嵌套字典和混合列表字典的差异显示。
for more information, see https://pre-commit.ci
Member
Author
Member
|
Please don't spam random open source projects with noise for testing things. |
Author
非常抱歉,给pytest带来了影响,我是个新手,不了解这样做会造成这种后果,再次致以诚挚的歉意 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


添加递归查找第一个差异路径的功能,并在断言失败时显示结构化差异信息,包括差异路径、期望值和实际值。同时更新相关测试用例以验证新功能。
新增
_find_first_diff_path函数递归查找字典和列表中的第一个差异,并返回路径和差异值。在assertrepr_compare中为字典和列表类型的 == 断言添加结构化差异信息。测试用例验证了简单字典、嵌套字典和混合列表字典的差异显示。