fix tests for <v3.7

This commit is contained in:
Anthony Scopatz 2019-10-01 17:01:20 -04:00
parent 5afba70f1e
commit f0160e54d8

View file

@ -368,6 +368,9 @@ print(check_output(["echo", "hello"]).decode("utf8"))
#
(
"""
import sys
if sys.version_tuple[:2] >= (3, 7):
with open("sourced-file.xsh", "w") as f:
f.write('''
from contextvars import ContextVar
@ -382,6 +385,8 @@ print("Var " + var.get())
import os
os.remove('sourced-file.xsh')
else:
print("Var foo")
""",
"Var foo\n",
0,