From 1774bf8440f65804aed2e16b15bbaad4e01c3d2b Mon Sep 17 00:00:00 2001 From: Minoru Akagi Date: Tue, 7 Nov 2023 10:32:20 +0900 Subject: [PATCH] test: resize window before starting tests --- tests/gui/test_gui.py | 17 +++++------------ tests/gui/wnd_geom.bin | Bin 66 -> 0 bytes 2 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 tests/gui/wnd_geom.bin diff --git a/tests/gui/test_gui.py b/tests/gui/test_gui.py index 731d2e24..d27123c6 100644 --- a/tests/gui/test_gui.py +++ b/tests/gui/test_gui.py @@ -15,6 +15,7 @@ from Qgis2threejs.tools import js_bool, logMessage +WIDTH, HEIGHT = (800, 600) # view size UNDEF = "undefined" @@ -304,19 +305,11 @@ def runTest(wnd): initOutputDir() - geomFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "wnd_geom.bin") - if os.path.exists(geomFile): - with open(geomFile, "rb") as f: - wnd.restoreGeometry(f.read()) - - logMessage("Window geometry restored from file.") - - else: - with open(geomFile, "wb") as f: - f.write(wnd.saveGeometry()) - - logMessage("Window geometry saved to a file.") + # set view size + wnd.resize(wnd.width() + WIDTH - wnd.ui.webView.width(), + wnd.height() + HEIGHT - wnd.ui.webView.height()) + # test suite testClasses = [SceneTest, PointLayerTest, LineLayerTest, PolygonLayerTest, WidgetTest] suite = unittest.TestSuite() diff --git a/tests/gui/wnd_geom.bin b/tests/gui/wnd_geom.bin deleted file mode 100644 index 45e15e7cc85d9c996f743d79bb71cdfedf6ae569..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 66 ucmZR)dEqnzGXn^O0