Add integration test

This commit is contained in:
2026-06-13 16:49:27 +02:00
parent 4b35c7cf4c
commit a49fc43ae5
2 changed files with 23 additions and 0 deletions
View File
+23
View File
@@ -0,0 +1,23 @@
import os
import tempfile
import sys
sys.path.insert(0, "../src")
from buttonplus_generator.constants import ClickType
from buttonplus_generator.generator import generate
tempdir = tempfile.gettempdir()
output = os.path.join(tempdir, "btnplus_test")
generate(output, True, "test", 1, 3, ["Page1", "Page2"], [ClickType.SINGLE, ClickType.TRIPLE], True, True, "", True)
expected_file_user = output + ".yaml"
expected_file_base = output + "_base.yaml"
if not os.path.exists(expected_file_user):
raise FileNotFoundError("User file not generated")
if not os.path.exists(expected_file_base):
raise FileNotFoundError("Base file not generated")