Python: Make space for additional python modules

Move Slint module into sub-directory under api/python
This commit is contained in:
Simon Hausmann 2025-06-25 10:20:51 +02:00 committed by Simon Hausmann
parent ad2766518e
commit 86befbe769
43 changed files with 31 additions and 31 deletions

View file

@ -38,7 +38,7 @@ def test_property_access() -> None:
finished: true,
dash-prop: true,
};
in property <image> imageprop: @image-url("../../../demos/printerdemo/ui/images/cat.jpg");
in property <image> imageprop: @image-url("../../../../demos/printerdemo/ui/images/cat.jpg");
callback test-callback();
}
@ -103,7 +103,7 @@ def test_property_access() -> None:
Image.load_from_path(
os.path.join(
os.path.dirname(__file__),
"../../../examples/iot-dashboard/images/humidity.png",
"../../../../examples/iot-dashboard/images/humidity.png",
)
),
)
@ -193,7 +193,7 @@ def test_callbacks() -> None:
if __name__ == "__main__":
import slint
module = slint.load_file(Path("../../demos/printerdemo/ui/printerdemo.slint"))
module = slint.load_file(Path("../../../demos/printerdemo/ui/printerdemo.slint"))
instance = module.MainWindow()
instance.PrinterQueue.start_job = lambda title: print(f"new print job {title}")
instance.run()

View file

@ -15,7 +15,7 @@ def test_magic_import_path() -> None:
oldsyspath = sys.path
assert loader.printerdemo is None
try:
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", ".."))
instance = loader.demos.printerdemo.ui.printerdemo.MainWindow()
del instance
finally: