Fix unittest if run from non-unicode shell
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Mon, 11 Feb 2019 10:54:50 +0000 (11:54 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Mon, 11 Feb 2019 12:17:33 +0000 (13:17 +0100)
commit5465e48c373b1e65be396696c18c527b342e9de1
tree268589228b2faf37911786a29d6e425f3524aa84
parent02fe61790eef7989db0c0fefa8023834d3407fd0
Fix unittest if run from non-unicode shell

When opening files (like os.devnull) in text mode, python uses the shell's
default encoding. In case LANG=C or when redirecting (for example), that
is just 'ascii', so writing non-ascii strings to /dev/null fails with
UnicodeError
test/test_cnfvar.py