mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 22:42:44 +01:00
Correctly encode arguments in tests
This commit is contained in:
parent
9e27c9e5ac
commit
469aee9848
1 changed files with 6 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue