views.main: Handle the help menu in the main view
[git-cola.git] / test / test_cola_core.py
blobb036dc8a286e94190ed39d8558270e245f9810c4
1 #!/usr/bin/env python
2 # -*- encoding: utf-8 -*-
3 import os
4 import unittest
6 import helper
8 from cola import core
10 class CoreColaUnicodeTestCase(unittest.TestCase):
11 """Tests the cola.core module's unicode handling
12 """
14 def test_core_decode(self):
15 """Test the core.decode function
16 """
17 filename = helper.fixture('unicode.txt')
18 fh = open(filename)
19 content = core.read_nointr(fh).strip()
20 fh.close()
21 self.assertEqual(core.decode(content), u'unicøde')
23 def test_core_encode(self):
24 """Test the core.encode function
25 """
26 filename = helper.fixture('unicode.txt')
27 fh = open(filename)
28 content = core.read_nointr(fh).strip()
29 fh.close()
30 self.assertEqual(content, core.encode(u'unicøde'))
33 if __name__ == '__main__':
34 unittest.main()