Commits

Mike Bayer committed 66300eb

fix two py3k failures

Comments (0)

Files changed (2)

test/test_exceptions.py

                     assert u"".encode(sys.getdefaultencoding(),
                                             'htmlentityreplace') in html_error
                 except ImportError:
-                    assert u"3 ${'привет'}".encode(sys.getdefaultencoding(),
+                    assert u"${'привет'}".encode(sys.getdefaultencoding(),
                                             'htmlentityreplace') in html_error
             else:
                 try:

test/test_util.py

     def test_read_file(self):
         fn = os.path.join(os.path.dirname(__file__), 'test_util.py')
         data = util.read_file(fn, 'rb')
-        self.failUnless('test_util' in data)
+        self.failUnless('test_util' in str(data)) # str() for py3k
 
     def test_load_module(self):
         fn = os.path.join(os.path.dirname(__file__), 'test_util.py')