mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 00:22:00 +00:00
17 lines
378 B
Python
Executable File
17 lines
378 B
Python
Executable File
import subprocess, sys, os
|
|
|
|
path = os.path.dirname(__file__)
|
|
if path != '':
|
|
os.chdir(path)
|
|
|
|
name = sys.argv[1]
|
|
output = subprocess.check_output([sys.executable, name + ".py"]).decode('utf-8')
|
|
reference = open(name + '.ref', 'r').read()
|
|
|
|
if output == reference:
|
|
print('Test "%s" succeeded.' % name)
|
|
exit(0)
|
|
else:
|
|
print('Test "%s" FAILED!' % name)
|
|
exit(-1)
|