From 79653a8b986c2554e80d235e62dabc28cd9a02d6 Mon Sep 17 00:00:00 2001 From: MinyazevR Date: Wed, 11 Dec 2024 19:08:21 +0300 Subject: [PATCH] Add cleanup call to all tests --- tests/PythonQtTests.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/PythonQtTests.cpp b/tests/PythonQtTests.cpp index cf7e17c6..cca3d67b 100644 --- a/tests/PythonQtTests.cpp +++ b/tests/PythonQtTests.cpp @@ -57,26 +57,28 @@ void PythonQtMemoryTests::cleanup() void PythonQtMemoryTests::testBaseCleanup() { PythonQt::init(); + cleanup(); } void PythonQtMemoryTests::testCleanupWithFlags() { PythonQt::init(PythonQt::IgnoreSiteModule | PythonQt::RedirectStdOut); + cleanup(); } void PythonQtMemoryTests::testInitAlreadyInitialized() { Py_InitializeEx(true); PythonQt::init(PythonQt::PythonAlreadyInitialized); + cleanup(); } void PythonQtMemoryTests::testSeveralCleanup() { - return; PythonQt::init(); - PythonQt::preCleanup(); - PythonQt::cleanup(); + cleanup(); PythonQt::init(); + cleanup(); } void PythonQtMemoryTests::testInitWithPreconfig() { @@ -85,6 +87,7 @@ void PythonQtMemoryTests::testInitWithPreconfig() { PyConfig_InitPythonConfig(&config); Py_InitializeFromConfig(&config); PythonQt::init(PythonQt::RedirectStdOut | PythonQt::PythonAlreadyInitialized); + cleanup(); #endif }