Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaygain: Handle invalid XML output from bs1770gain #3247

Merged
merged 1 commit into from May 2, 2019

Conversation

Projects
None yet
2 participants
@jackwilsdon
Copy link
Member

commented May 1, 2019

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 extends ReplayGainCliTestBase, 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

@sampsyo
Copy link
Member

left a comment

Cool; thank you! The testing looks perfectly good to me—I understand your discomfort with mocking the call method, but it's a pretty straightforward way to get this done. 🚢

Show resolved Hide resolved beetsplug/replaygain.py Outdated

@jackwilsdon jackwilsdon force-pushed the jackwilsdon:b1770gain-malformed-xml branch from a075008 to f09088d May 2, 2019

@jackwilsdon jackwilsdon marked this pull request as ready for review May 2, 2019

@sampsyo sampsyo merged commit f09088d into beetbox:master May 2, 2019

0 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details

sampsyo added a commit that referenced this pull request May 2, 2019

Merge pull request #3247 from jackwilsdon/b1770gain-malformed-xml
replaygain: Handle invalid XML output from bs1770gain

sampsyo added a commit that referenced this pull request May 2, 2019

sampsyo added a commit that referenced this pull request May 2, 2019

@sampsyo

This comment has been minimized.

Copy link
Member

commented May 2, 2019

Wonderful; thanks again!! 🎉

@jackwilsdon

This comment has been minimized.

Copy link
Member Author

commented May 2, 2019

I realise I didn't update the test with the new message, oops! Cheers for sorting it out 👍 appreciated as always.

@jackwilsdon jackwilsdon deleted the jackwilsdon:b1770gain-malformed-xml branch May 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.