Add a build test for getting unicode env vars on windows

This commit is contained in:
Kovid Goyal 2019-05-15 16:57:36 +05:30
parent 65a0eaeac2
commit 17b84867dd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -165,6 +165,12 @@ class BuildTest(unittest.TestCase):
x = strftime(fmt, t) x = strftime(fmt, t)
au(x, 'strftime') au(x, 'strftime')
self.assertEqual(unicode_type(time.strftime(fmt.replace('%e', '%#d'), t)), x) self.assertEqual(unicode_type(time.strftime(fmt.replace('%e', '%#d'), t)), x)
from polyglot.builtins import getenv
q = 'value'
os.environ['test_unicode_getenv'] = q
val = getenv('test_unicode_getenv')
self.assertEqual(val, q)
self.assertTrue(isinstance(val, type('')))
def test_sqlite(self): def test_sqlite(self):
import sqlite3 import sqlite3