aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_history/blacklist.txt4
-rw-r--r--sources/shiboken2/tests/smartbinding/smart_pointer_test.py7
2 files changed, 8 insertions, 3 deletions
diff --git a/build_history/blacklist.txt b/build_history/blacklist.txt
index adcf5206d..33c1ba016 100644
--- a/build_history/blacklist.txt
+++ b/build_history/blacklist.txt
@@ -68,9 +68,7 @@
[QtQml::qquickitem_grabToImage]
darwin
[smart::smart_pointer]
- win32
- linux
- darwin
+ py2
# PYSIDE-474
[QtWebEngineWidgets::pyside-474-qtwebengineview]
py2
diff --git a/sources/shiboken2/tests/smartbinding/smart_pointer_test.py b/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
index e1883c7cc..b26a3dcbc 100644
--- a/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
+++ b/sources/shiboken2/tests/smartbinding/smart_pointer_test.py
@@ -29,6 +29,10 @@
##
#############################################################################
+from __future__ import print_function
+
+import gc
+import sys
import unittest
from copy import copy
from smart import Obj, Registry, Integer
@@ -79,6 +83,9 @@ class SmartPointerTests(unittest.TestCase):
result = ptrToObj.takeInteger(ptrToObj.m_internalInteger)
self.assertEqual(integerCount(), 2)
result = None
+ if integerCount() > 1:
+ gc.collect()
+ print('Running garbage collector for reference test', file=sys.stderr)
self.assertEqual(integerCount(), 1)
# Make a copy of the shared pointer, object count should not change.