From 6f3f574c90aa8ce0cec9241e0fee2cf8f030d955 Mon Sep 17 00:00:00 2001 From: Nick Murphy Date: Tue, 4 Jun 2024 05:50:20 -0600 Subject: [PATCH] Clarify error message to indicate that users should refer to the documentation of pytest-xdist (#1092) --- changelog/1092.trivial | 1 + src/xdist/report.py | 3 ++- testing/test_dsession.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog/1092.trivial diff --git a/changelog/1092.trivial b/changelog/1092.trivial new file mode 100644 index 0000000..295c701 --- /dev/null +++ b/changelog/1092.trivial @@ -0,0 +1 @@ +Update an error message to better indicate where users should go for more information. diff --git a/src/xdist/report.py b/src/xdist/report.py index eb463ab..ea00e5b 100644 --- a/src/xdist/report.py +++ b/src/xdist/report.py @@ -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 diff --git a/testing/test_dsession.py b/testing/test_dsession.py index e57caeb..184fe35 100644 --- a/testing/test_dsession.py +++ b/testing/test_dsession.py @@ -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")