tests: remove #! lines and leverage pytest further
[git-cola.git] / test / compat_test.py
blobc94b5e34a88d19d558291eb426695f6fe416228e
1 """Tests the compat module"""
2 # encoding: utf-8
3 from __future__ import absolute_import, division, 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)