Commit ee666ed5 authored by Tom Niget's avatar Tom Niget

Add directive for not running tests (for interactive ones)

parent dfa7f148
......@@ -24,7 +24,9 @@ def run_tests():
print("Skipping")
continue
with open(path, "r", encoding="utf-8") as f:
res = format_code(transpile(f.read()))
code = f.read()
execute = "# norun" not in code
res = format_code(transpile(code))
#print(res)
name_cpp = path.with_suffix('.cpp')
with open(name_cpp, "w", encoding="utf-8") as fcpp:
......@@ -32,9 +34,12 @@ def run_tests():
print(".cpp generated")
if args.compile:
continue
if not execute:
print("Not executing", path.name)
continue
name_bin = path.with_suffix('').as_posix()
commands = [
# f"bash -c 'PYTHONPATH=stdlib python3 ./{path.as_posix()}'",
f"bash -c 'PYTHONPATH=stdlib python3 ./{path.as_posix()}'",
]
if alt := environ.get("ALT_RUNNER"):
commands.append(alt.format(name_bin=name_bin, name_cpp_posix=name_cpp.as_posix()))
......
# coding: utf-8
# norun
import sys
from socket import socket, SOCK_STREAM, AF_INET6, SOL_SOCKET, SO_REUSEADDR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment