From 469aee9848161e9d18adc1c93b5e820e66069e85 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 31 May 2016 15:32:09 -0700 Subject: [PATCH] Correctly encode arguments in tests --- test/test_convert.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test_convert.py b/test/test_convert.py index 16f2f4799..675c4be95 100644 --- a/test/test_convert.py +++ b/test/test_convert.py @@ -24,6 +24,7 @@ from test.helper import control_stdin from beets.mediafile import MediaFile from beets import util +from beets import ui class TestHelper(helper.TestHelper): @@ -107,7 +108,11 @@ class ConvertCommand(object): """ def run_convert_path(self, path, *args): """Run the `convert` command on a given path.""" - args = args + ('path:' + path,) + # The path is currently a filesystem bytestring. Convert it to + # an argument bytestring. + path = path.decode(util._fsencoding()).encode(ui._arg_encoding()) + + args = args + (b'path:' + path,) return self.run_command('convert', *args) def run_convert(self, *args):