filelist: use the sorted commit list to get the diff range
[git-cola.git] / test / compat_test.py
blob392fc52bc1329fb75758ff8e0661815479a10c4a
1 # encoding: utf-8
2 """Tests the compat module"""
3 from __future__ import absolute_import, division, print_function, unicode_literals
4 import os
6 from cola import compat
9 def test_setenv():
10 """Test the core.decode function"""
11 key = 'COLA_UNICODE_TEST'
12 value = '字龍'
13 compat.setenv(key, value)
14 assert key in os.environ
15 assert os.getenv(key)
17 compat.unsetenv(key)
18 assert key not in os.environ
19 assert not os.getenv(key)