File: compat_test.py

package info (click to toggle)
git-cola 4.13.0-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 6,480 kB
  • sloc: python: 36,938; sh: 304; makefile: 223; xml: 100; tcl: 62
file content (17 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Tests the compat module"""
import os

from cola import compat


def test_setenv():
    """Test the core.decode function"""
    key = 'COLA_UNICODE_TEST'
    value = '字龍'
    compat.setenv(key, value)
    assert key in os.environ
    assert os.getenv(key)

    compat.unsetenv(key)
    assert key not in os.environ
    assert not os.getenv(key)