From a49fc43ae5a4278434c81f86665088ec02f74aac Mon Sep 17 00:00:00 2001 From: kennyboy55 Date: Sat, 13 Jun 2026 16:49:27 +0200 Subject: [PATCH] Add integration test --- test/__init__.py | 0 test/integration_test.py | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 test/__init__.py create mode 100644 test/integration_test.py diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/integration_test.py b/test/integration_test.py new file mode 100644 index 0000000..d7c4345 --- /dev/null +++ b/test/integration_test.py @@ -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") \ No newline at end of file