mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
fix tests for <v3.7
This commit is contained in:
parent
5afba70f1e
commit
f0160e54d8
1 changed files with 12 additions and 7 deletions
|
@ -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:
|
with open("sourced-file.xsh", "w") as f:
|
||||||
f.write('''
|
f.write('''
|
||||||
from contextvars import ContextVar
|
from contextvars import ContextVar
|
||||||
|
@ -382,6 +385,8 @@ print("Var " + var.get())
|
||||||
|
|
||||||
import os
|
import os
|
||||||
os.remove('sourced-file.xsh')
|
os.remove('sourced-file.xsh')
|
||||||
|
else:
|
||||||
|
print("Var foo")
|
||||||
""",
|
""",
|
||||||
"Var foo\n",
|
"Var foo\n",
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue