BranchesWidget: sort order toggle button
[git-cola.git] / test / compat_test.py
blob3a1c928776e3a185c617fcb83356be2e31157bfa
1 #!/usr/bin/env python
2 # encoding: utf-8
3 from __future__ import absolute_import, division, unicode_literals
4 import os
5 import unittest
7 from cola import compat
10 class CompatTestCase(unittest.TestCase):
11 """Tests the compat module"""
13 def test_setenv(self):
14 """Test the core.decode function
15 """
16 key = 'COLA_UNICODE_TEST'
17 value = '字龍'
18 compat.setenv(key, value)
19 self.assertTrue(key in os.environ)
20 self.assertTrue(os.getenv(key))
22 compat.unsetenv(key)
23 self.assertFalse(key in os.environ)
24 self.assertFalse(os.getenv(key))
27 if __name__ == '__main__':
28 unittest.main()