From: Dylan Baker <baker.dyla...@gmail.com> This actually needs to handle bytes, since it gets assigned from subprocess directly.
Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com> --- unittests/results_tests.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/unittests/results_tests.py b/unittests/results_tests.py index 2f5c440..a109785 100644 --- a/unittests/results_tests.py +++ b/unittests/results_tests.py @@ -397,17 +397,17 @@ class TestStringDescriptor(object): self.test.val = 'foo' self.test.val = 1 - def test_set_unicode(self): - """results.StringDescriptor.__set__: unicode is stored directly""" - inst = u'foo' + def test_set_str(self): + """results.StringDescriptor.__set__: str is stored directly""" + inst = 'foo' self.test.val = inst nt.eq_(self.test.val, inst) - def test_set_str(self): - """results.StringDescriptor.__set__: converts strs to unicode""" - inst = 'foo' + def test_set_bytes(self): + """results.StringDescriptor.__set__: converts bytes to str""" + inst = b'foo' self.test.val = inst - nt.eq_(self.test.val, unicode(inst)) + nt.eq_(self.test.val, 'foo') @utils.no_error def test_set_str_unicode_literals(self): -- 2.7.0 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit