1. Atsushi Odagiri
  2. mako-inheritance

Commits

Mike Bayer  committed 66300eb

fix two py3k failures

  • Participants
  • Parent commits 408e356
  • Branches default

Comments (0)

Files changed (2)

File test/test_exceptions.py

View file
                     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:

File test/test_util.py

View file
     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')