replaygain: Handle invalid XML output from bs1770gain #3247
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.
I've opened this as a draft as I'm not 100% happy with my test implementation (and also the wording of the error itself). I implemented the test in the way I did as I didn't want us to actually require bs1770gain to run the test, as we are mocking the tool's output anyway. This meant that we couldn't use the existing
ReplayGainLdnsCliTest
class as it extendsReplayGainCliTestBase
, which tries to run a whole suite of tests on the backend.I'm not a fan of patching
beetsplug.replaygain.call
, as it's a somewhat "internal" feature of the plugin, but I couldn't see another way to mock the output from bs1770gain.Fixes #2983