Skip to content

Commit 79653a8

Browse files
MinyazevRiakov
authored andcommitted
Add cleanup call to all tests
1 parent 0078875 commit 79653a8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/PythonQtTests.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,28 @@ void PythonQtMemoryTests::cleanup()
5757
void PythonQtMemoryTests::testBaseCleanup()
5858
{
5959
PythonQt::init();
60+
cleanup();
6061
}
6162

6263
void PythonQtMemoryTests::testCleanupWithFlags()
6364
{
6465
PythonQt::init(PythonQt::IgnoreSiteModule | PythonQt::RedirectStdOut);
66+
cleanup();
6567
}
6668

6769
void PythonQtMemoryTests::testInitAlreadyInitialized()
6870
{
6971
Py_InitializeEx(true);
7072
PythonQt::init(PythonQt::PythonAlreadyInitialized);
73+
cleanup();
7174
}
7275

7376
void PythonQtMemoryTests::testSeveralCleanup() {
74-
return;
7577
PythonQt::init();
76-
PythonQt::preCleanup();
77-
PythonQt::cleanup();
78+
cleanup();
7879

7980
PythonQt::init();
81+
cleanup();
8082
}
8183

8284
void PythonQtMemoryTests::testInitWithPreconfig() {
@@ -85,6 +87,7 @@ void PythonQtMemoryTests::testInitWithPreconfig() {
8587
PyConfig_InitPythonConfig(&config);
8688
Py_InitializeFromConfig(&config);
8789
PythonQt::init(PythonQt::RedirectStdOut | PythonQt::PythonAlreadyInitialized);
90+
cleanup();
8891
#endif
8992
}
9093

0 commit comments

Comments
 (0)