Skip to content

Instantly share code, notes, and snippets.

@asvetlov
Created October 29, 2012 20:42
Show Gist options
  • Save asvetlov/3976411 to your computer and use it in GitHub Desktop.
Save asvetlov/3976411 to your computer and use it in GitHub Desktop.
Hack to print Russian letters in unittests
# -*- encoding: utf-8 -*-
import unittest
class TestSomething(unittest.TestCase):
def test_unicode(self):
self.assertEqual(u'Русский', u'Текст')
if __name__ == '__main__':
import sys
reload(sys)
sys.setdefaultencoding('utf8')
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment