Clarify error message to indicate that users should refer to the documentation of pytest-xdist (#1092)
This commit is contained in:
1
changelog/1092.trivial
Normal file
1
changelog/1092.trivial
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Update an error message to better indicate where users should go for more information.
|
||||||
@@ -23,7 +23,8 @@ def report_collection_diff(
|
|||||||
"Different tests were collected between {from_id} and {to_id}. "
|
"Different tests were collected between {from_id} and {to_id}. "
|
||||||
"The difference is:\n"
|
"The difference is:\n"
|
||||||
"{diff}\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))
|
).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"))
|
msg = "\n".join(x.rstrip() for x in error_message.split("\n"))
|
||||||
return msg
|
return msg
|
||||||
|
|||||||
@@ -543,7 +543,8 @@ def test_report_collection_diff_different() -> None:
|
|||||||
"+XXX\n"
|
"+XXX\n"
|
||||||
" ccc\n"
|
" ccc\n"
|
||||||
"-YYY\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")
|
msg = report_collection_diff(from_collection, to_collection, "1", "2")
|
||||||
|
|||||||
Reference in New Issue
Block a user