Skip to content

Guard against duplicate xunit attachment names#1783

Merged
SimonCropp merged 1 commit into
mainfrom
Guard-against-duplicate-xunit-attachment-names
Jul 9, 2026
Merged

Guard against duplicate xunit attachment names#1783
SimonCropp merged 1 commit into
mainfrom
Guard-against-duplicate-xunit-attachment-names

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

A test can add the same received file as an attachment more than once — e.g. several failing Verify calls that share a received name via DisableRequireUniquePrefix. xunit's AddAttachment throws on a duplicate name, surfacing as an ArgumentException instead of the expected VerifyException. Skip the add when the name is already attached.

A test can add the same received file as an attachment more than once —
e.g. several failing Verify calls that share a received name via
DisableRequireUniquePrefix. xunit's AddAttachment throws on a duplicate
name, surfacing as an ArgumentException instead of the expected
VerifyException. Skip the add when the name is already attached.
@SimonCropp SimonCropp added this to the 31.22.0 milestone Jul 9, 2026
@SimonCropp SimonCropp merged commit f16f970 into main Jul 9, 2026
6 of 7 checks passed
@SimonCropp SimonCropp deleted the Guard-against-duplicate-xunit-attachment-names branch July 9, 2026 04:54
This was referenced Jul 9, 2026
This was referenced Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant