#  tests for kaleido-core-0.2.1-h2bbff1b_0 (this is a generated file);
print('===== testing package: kaleido-core-0.2.1-h2bbff1b_0 =====');
print('running run_test.py');
#  --- run_test.py (begin) ---
from subprocess import Popen, PIPE
import json
import platform

if platform.system() == "Windows":
    ext = ".cmd"
else:
    ext = ""

p = Popen(
    ['kaleido' + ext, "plotly", "--disable-gpu", "--no-sandbox", "--disable-breakpad"],
    stdout=PIPE, stdin=PIPE, stderr=PIPE,
    text=True
)

stdout_data = p.communicate(
    input=json.dumps({"data": {"data": []}, "format": "png"})
)[0]
assert "iVBORw" in stdout_data
#  --- run_test.py (end) ---

print('===== kaleido-core-0.2.1-h2bbff1b_0 OK =====');
