Skip to content

Commit 012b81d

Browse files
authored
add six to testserver setup.py (Azure#20456)
* add six to testserver setup.py * add mindep for six * add additional args for pypy in testserver
1 parent 7cc7621 commit 012b81d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

sdk/core/azure-core/tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import os
3030
import subprocess
3131
import random
32+
import platform
3233
from six.moves import urllib
3334
from rest_client import TestRestClient
3435
import sys
@@ -71,6 +72,11 @@ def start_testserver():
7172
port = get_port()
7273
os.environ["FLASK_APP"] = "coretestserver"
7374
os.environ["FLASK_PORT"] = str(port)
75+
if platform.python_implementation() == 'PyPy':
76+
# pypy is now getting mad at us for some of our encoding / text, so need
77+
# to set these additional env vars for pypy
78+
os.environ["LC_ALL"] = "C.UTF-8"
79+
os.environ["LANG"] = "C.UTF-8"
7480
cmd = "flask run -p {}".format(port)
7581
if os.name == 'nt': #On windows, subprocess creation works without being in the shell
7682
child_process = subprocess.Popen(cmd, env=dict(os.environ))

sdk/core/azure-core/tests/testserver_tests/coretestserver/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
],
3131
packages=find_packages(),
3232
install_requires=[
33-
"flask"
33+
"flask",
34+
"six>=1.11.0",
3435
]
3536
)

0 commit comments

Comments
 (0)