Clarify error message to indicate that users should refer to the documentation of pytest-xdist (#1092)

This commit is contained in:
Nick Murphy
2024-06-04 05:50:20 -06:00
committed by GitHub
parent 7cc6515c06
commit 6f3f574c90
3 changed files with 5 additions and 2 deletions

1
changelog/1092.trivial Normal file
View File

@@ -0,0 +1 @@
Update an error message to better indicate where users should go for more information.

View File

@@ -23,7 +23,8 @@ def report_collection_diff(
"Different tests were collected between {from_id} and {to_id}. "
"The difference is:\n"
"{diff}\n"
"To see why this happens see Known limitations in documentation"
"To see why this happens see 'Known limitations' in documentation "
"for pytest-xdist"
).format(from_id=from_id, to_id=to_id, diff="\n".join(diff))
msg = "\n".join(x.rstrip() for x in error_message.split("\n"))
return msg

View File

@@ -543,7 +543,8 @@ def test_report_collection_diff_different() -> None:
"+XXX\n"
" ccc\n"
"-YYY\n"
"To see why this happens see Known limitations in documentation"
"To see why this happens see 'Known limitations' in documentation "
"for pytest-xdist"
)
msg = report_collection_diff(from_collection, to_collection, "1", "2")