From f465123dddb6d9c09ebc2848aec6957ade8b3561 2013-09-16 23:13:01 From: Thomas Kluyver Date: 2013-09-16 23:13:01 Subject: [PATCH] AssertPrints checks for instances of string_types --- diff --git a/IPython/testing/tools.py b/IPython/testing/tools.py index a8fc8d5..52fdc58 100644 --- a/IPython/testing/tools.py +++ b/IPython/testing/tools.py @@ -18,7 +18,6 @@ from __future__ import absolute_import # Imports #----------------------------------------------------------------------------- -import inspect import os import re import sys @@ -346,7 +345,7 @@ class AssertPrints(object): """ def __init__(self, s, channel='stdout', suppress=True): self.s = s - if isinstance(self.s, str): + if isinstance(self.s, py3compat.string_types): self.s = [self.s] self.channel = channel self.suppress = suppress