From 152e93136bfe4ecf3fa063067526220ae09a39ad Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Tue, 20 Jan 2015 15:41:48 +0100 Subject: [PATCH] test._common and test.helper use unicode literals --- test/_common.py | 7 ++++--- test/helper.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/_common.py b/test/_common.py index 6e6071534..723915d01 100644 --- a/test/_common.py +++ b/test/_common.py @@ -13,7 +13,8 @@ # included in all copies or substantial portions of the Software. """Some common functionality for beets' test cases.""" -from __future__ import division, absolute_import, print_function +from __future__ import (division, absolute_import, print_function, + unicode_literals) import time import sys @@ -237,7 +238,7 @@ class DummyOut(object): self.buf.append(s) def get(self): - return ''.join(self.buf) + return b''.join(self.buf) def clear(self): self.buf = [] @@ -252,7 +253,7 @@ class DummyIn(object): self.out = out def add(self, s): - self.buf.append(s + '\n') + self.buf.append(s + b'\n') def readline(self): if not self.buf: diff --git a/test/helper.py b/test/helper.py index 3e1cb1268..2d38599ce 100644 --- a/test/helper.py +++ b/test/helper.py @@ -30,7 +30,8 @@ information or mock the environment. """ -from __future__ import division, absolute_import, print_function +from __future__ import (division, absolute_import, print_function, + unicode_literals) import sys import os