aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/samplebinding
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/tests/samplebinding')
-rw-r--r--sources/shiboken2/tests/samplebinding/__del___test.py7
-rw-r--r--sources/shiboken2/tests/samplebinding/abstract_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/addedfunction_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/addedfunction_with_container_args_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/argumentmodifications_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/array_numpy_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/array_sequence_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/bug_554_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/bug_704_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/bytearray_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/child_return_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/class_fields_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/collector_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/complex_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/conversion_operator_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/copy_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/ctorconvrule_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/cyclic_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/date_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/decisor_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/delete_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/deprecated_test.py8
-rw-r--r--sources/shiboken2/tests/samplebinding/derived_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/duck_punching_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/echo_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/enum_test.py7
-rw-r--r--sources/shiboken2/tests/samplebinding/enumfromremovednamespace_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/event_loop_call_virtual_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/event_loop_thread_test.py8
-rw-r--r--sources/shiboken2/tests/samplebinding/exception_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/filter_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/handleholder_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/hashabletype_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/ignorederefop_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/implicitconv_numerical_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/implicitconv_test.py6
-rw-r--r--[-rwxr-xr-x]sources/shiboken2/tests/samplebinding/inheritanceandscope_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/injectcode_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/innerclass_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/intlist_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/invalid_virtual_return_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/keep_reference_test.py8
-rw-r--r--sources/shiboken2/tests/samplebinding/list_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/lock_test.py8
-rw-r--r--sources/shiboken2/tests/samplebinding/map_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/metaclass_test.py9
-rw-r--r--sources/shiboken2/tests/samplebinding/mi_virtual_methods_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/mixed_mi_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/modelindex_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/modelview_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/modifications_test.py16
-rw-r--r--sources/shiboken2/tests/samplebinding/modified_constructor_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/modifiedvirtualmethods_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/multi_cpp_inheritance_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/multiple_derived_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/namespace_test.py7
-rw-r--r--sources/shiboken2/tests/samplebinding/newdivision_test.py10
-rw-r--r--sources/shiboken2/tests/samplebinding/nondefaultctor_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/nontypetemplate_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/nonzero_test.py7
-rw-r--r--sources/shiboken2/tests/samplebinding/numericaltypedef_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/numpy_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/objecttype_test.py6
-rw-r--r--[-rwxr-xr-x]sources/shiboken2/tests/samplebinding/objecttype_with_named_args_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/objecttypebyvalue_test.py10
-rw-r--r--sources/shiboken2/tests/samplebinding/objecttypelayout_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/objecttypeoperators_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/objecttypereferenceasvirtualmethodargument_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/oddbool_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/oldstyleclass_as_number_test.py7
-rw-r--r--sources/shiboken2/tests/samplebinding/onlycopyclass_test.py7
-rw-r--r--sources/shiboken2/tests/samplebinding/overflow_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/overload_sorting_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/overload_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/overloadwithdefault_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_argument_invalidation_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_delete_child_in_cpp_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_delete_child_in_python_test.py8
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_delete_parent_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_invalidate_after_use_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_invalidate_child_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_invalidate_nonpolymorphic_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_invalidate_parent_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_reparenting_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/ownership_transference_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/pair_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/pen_test.py8
-rw-r--r--sources/shiboken2/tests/samplebinding/point_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/pointerholder_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/pointf_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/primitivereferenceargument_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/privatector_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/privatedtor_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/protected_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/pstrlist_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/pystr_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/python_thread_test.py14
-rw-r--r--sources/shiboken2/tests/samplebinding/receive_null_cstring_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/reference_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/referencetopointer_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/return_null_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/richcompare_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/sample_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/simplefile_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/size_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/static_nonstatic_methods_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/str_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/strlist_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/templateinheritingclass_test.py7
-rw-r--r--sources/shiboken2/tests/samplebinding/time_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/transform_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/typeconverters_test.py7
-rw-r--r--sources/shiboken2/tests/samplebinding/typedealloc_test.py8
-rw-r--r--sources/shiboken2/tests/samplebinding/typedtordoublefree_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/typesystem_sample.xml8
-rw-r--r--sources/shiboken2/tests/samplebinding/unsafe_parent_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/useraddedctor_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/virtualdtor_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/virtualmethods_test.py5
-rw-r--r--sources/shiboken2/tests/samplebinding/visibilitychange_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/voidholder_test.py6
-rw-r--r--sources/shiboken2/tests/samplebinding/weakref_test.py8
-rw-r--r--sources/shiboken2/tests/samplebinding/writableclassdict_test.py7
124 files changed, 755 insertions, 15 deletions
diff --git a/sources/shiboken2/tests/samplebinding/__del___test.py b/sources/shiboken2/tests/samplebinding/__del___test.py
index 0f34ebb27..eba837eb8 100644
--- a/sources/shiboken2/tests/samplebinding/__del___test.py
+++ b/sources/shiboken2/tests/samplebinding/__del___test.py
@@ -29,7 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
import sample
delCalled = False
diff --git a/sources/shiboken2/tests/samplebinding/abstract_test.py b/sources/shiboken2/tests/samplebinding/abstract_test.py
index 33358ad2a..23a984870 100644
--- a/sources/shiboken2/tests/samplebinding/abstract_test.py
+++ b/sources/shiboken2/tests/samplebinding/abstract_test.py
@@ -31,9 +31,14 @@
'''Test cases for Abstract class'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Abstract
class Incomplete(Abstract):
diff --git a/sources/shiboken2/tests/samplebinding/addedfunction_test.py b/sources/shiboken2/tests/samplebinding/addedfunction_test.py
index 57cebbb3a..d7f5f3994 100644
--- a/sources/shiboken2/tests/samplebinding/addedfunction_test.py
+++ b/sources/shiboken2/tests/samplebinding/addedfunction_test.py
@@ -31,7 +31,13 @@
'''Test cases for added functions.'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import SampleNamespace, ObjectType, Point
class TestAddedFunctionsWithSimilarTypes(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/addedfunction_with_container_args_test.py b/sources/shiboken2/tests/samplebinding/addedfunction_with_container_args_test.py
index 0954ba470..9666b251c 100644
--- a/sources/shiboken2/tests/samplebinding/addedfunction_with_container_args_test.py
+++ b/sources/shiboken2/tests/samplebinding/addedfunction_with_container_args_test.py
@@ -31,7 +31,13 @@
'''Test cases for added functions with nested and multi-argument container types.'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import sum2d, sumproduct
class TestAddedFunctionsWithContainerArgs(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/argumentmodifications_test.py b/sources/shiboken2/tests/samplebinding/argumentmodifications_test.py
index aa27de331..8a2775db3 100644
--- a/sources/shiboken2/tests/samplebinding/argumentmodifications_test.py
+++ b/sources/shiboken2/tests/samplebinding/argumentmodifications_test.py
@@ -31,9 +31,14 @@
'''Test cases for method arguments modifications performed as described on typesystem.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Modifications, Point
class ArgumentModificationsTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/array_numpy_test.py b/sources/shiboken2/tests/samplebinding/array_numpy_test.py
index 37536930d..2c2a2852a 100644
--- a/sources/shiboken2/tests/samplebinding/array_numpy_test.py
+++ b/sources/shiboken2/tests/samplebinding/array_numpy_test.py
@@ -30,7 +30,13 @@
'''Test case for NumPy Array types.'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
import sample
hasNumPy = False
diff --git a/sources/shiboken2/tests/samplebinding/array_sequence_test.py b/sources/shiboken2/tests/samplebinding/array_sequence_test.py
index ac8217054..520a5f928 100644
--- a/sources/shiboken2/tests/samplebinding/array_sequence_test.py
+++ b/sources/shiboken2/tests/samplebinding/array_sequence_test.py
@@ -30,7 +30,13 @@
'''Test case for Array types (PySequence).'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
import sample
class ArrayTester(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/bug_554_test.py b/sources/shiboken2/tests/samplebinding/bug_554_test.py
index 85848fc39..c1c06a17f 100644
--- a/sources/shiboken2/tests/samplebinding/bug_554_test.py
+++ b/sources/shiboken2/tests/samplebinding/bug_554_test.py
@@ -31,6 +31,12 @@
'''Unit test for bug#554'''
+import os
+import sys
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
class Bug554:
diff --git a/sources/shiboken2/tests/samplebinding/bug_704_test.py b/sources/shiboken2/tests/samplebinding/bug_704_test.py
index 9aa865327..28c90aba4 100644
--- a/sources/shiboken2/tests/samplebinding/bug_704_test.py
+++ b/sources/shiboken2/tests/samplebinding/bug_704_test.py
@@ -29,7 +29,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from py3kcompat import IS_PY3K
from sample import ObjectType
diff --git a/sources/shiboken2/tests/samplebinding/bytearray_test.py b/sources/shiboken2/tests/samplebinding/bytearray_test.py
index e19271ca9..f1094e54e 100644
--- a/sources/shiboken2/tests/samplebinding/bytearray_test.py
+++ b/sources/shiboken2/tests/samplebinding/bytearray_test.py
@@ -29,7 +29,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from os.path import isdir
from sample import ByteArray
from py3kcompat import b
diff --git a/sources/shiboken2/tests/samplebinding/child_return_test.py b/sources/shiboken2/tests/samplebinding/child_return_test.py
index 49c843160..28fde4926 100644
--- a/sources/shiboken2/tests/samplebinding/child_return_test.py
+++ b/sources/shiboken2/tests/samplebinding/child_return_test.py
@@ -31,9 +31,14 @@
'''The BlackBox class has cases of ownership transference between C++ and Python.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
class ReturnOfChildTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/class_fields_test.py b/sources/shiboken2/tests/samplebinding/class_fields_test.py
index 6dbacbd97..202efcafb 100644
--- a/sources/shiboken2/tests/samplebinding/class_fields_test.py
+++ b/sources/shiboken2/tests/samplebinding/class_fields_test.py
@@ -31,9 +31,15 @@
'''Simple test case for accessing the exposed C++ class fields.'''
+import os
+import sys
from sys import getrefcount
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Derived, Point, ObjectType
class TestAccessingCppFields(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/collector_test.py b/sources/shiboken2/tests/samplebinding/collector_test.py
index f0b184a90..d6d10165e 100644
--- a/sources/shiboken2/tests/samplebinding/collector_test.py
+++ b/sources/shiboken2/tests/samplebinding/collector_test.py
@@ -31,9 +31,14 @@
'''Test cases for Collector class' shift operators.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Collector, IntWrapper, ObjectType
diff --git a/sources/shiboken2/tests/samplebinding/complex_test.py b/sources/shiboken2/tests/samplebinding/complex_test.py
index e14b07b91..bff7b5828 100644
--- a/sources/shiboken2/tests/samplebinding/complex_test.py
+++ b/sources/shiboken2/tests/samplebinding/complex_test.py
@@ -31,9 +31,14 @@
'''Test cases for Complex class'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
import sample
from sample import Point
diff --git a/sources/shiboken2/tests/samplebinding/conversion_operator_test.py b/sources/shiboken2/tests/samplebinding/conversion_operator_test.py
index 5faaaa4db..a18d27a0c 100644
--- a/sources/shiboken2/tests/samplebinding/conversion_operator_test.py
+++ b/sources/shiboken2/tests/samplebinding/conversion_operator_test.py
@@ -31,8 +31,14 @@
'''Test cases for implicit conversion generated by conversion operator.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Time, StrList
class ConversionOperatorTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/copy_test.py b/sources/shiboken2/tests/samplebinding/copy_test.py
index 7505454a2..a8e02d979 100644
--- a/sources/shiboken2/tests/samplebinding/copy_test.py
+++ b/sources/shiboken2/tests/samplebinding/copy_test.py
@@ -32,8 +32,14 @@
'''Test cases for deep copy of objects'''
import copy
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
try:
import cPickle as pickle
except ImportError:
diff --git a/sources/shiboken2/tests/samplebinding/ctorconvrule_test.py b/sources/shiboken2/tests/samplebinding/ctorconvrule_test.py
index b7efead63..7fd9b502c 100644
--- a/sources/shiboken2/tests/samplebinding/ctorconvrule_test.py
+++ b/sources/shiboken2/tests/samplebinding/ctorconvrule_test.py
@@ -31,8 +31,14 @@
'''Test cases for proper generation of constructor altered by conversion-rule tag.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import CtorConvRule
class TestCtorConvRule(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/cyclic_test.py b/sources/shiboken2/tests/samplebinding/cyclic_test.py
index 1940c8d2f..8fe029d59 100644
--- a/sources/shiboken2/tests/samplebinding/cyclic_test.py
+++ b/sources/shiboken2/tests/samplebinding/cyclic_test.py
@@ -29,7 +29,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectType
from sample import ObjectView
from sample import ObjectModel
diff --git a/sources/shiboken2/tests/samplebinding/date_test.py b/sources/shiboken2/tests/samplebinding/date_test.py
index fe7b9ac18..0a89db871 100644
--- a/sources/shiboken2/tests/samplebinding/date_test.py
+++ b/sources/shiboken2/tests/samplebinding/date_test.py
@@ -31,8 +31,13 @@
'''Test cases for python conversions types '''
+import os
import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from datetime import date
from sample import SbkDate
diff --git a/sources/shiboken2/tests/samplebinding/decisor_test.py b/sources/shiboken2/tests/samplebinding/decisor_test.py
index 734c43760..e98e45bfc 100644
--- a/sources/shiboken2/tests/samplebinding/decisor_test.py
+++ b/sources/shiboken2/tests/samplebinding/decisor_test.py
@@ -31,8 +31,14 @@
'''Test cases for the method overload decisor.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import SampleNamespace, Point, ObjectType, ObjectModel
class DecisorTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/delete_test.py b/sources/shiboken2/tests/samplebinding/delete_test.py
index 780da415c..b35bba4b0 100644
--- a/sources/shiboken2/tests/samplebinding/delete_test.py
+++ b/sources/shiboken2/tests/samplebinding/delete_test.py
@@ -29,7 +29,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
import sample
import shiboken2 as shiboken
diff --git a/sources/shiboken2/tests/samplebinding/deprecated_test.py b/sources/shiboken2/tests/samplebinding/deprecated_test.py
index b08f65271..d75490e17 100644
--- a/sources/shiboken2/tests/samplebinding/deprecated_test.py
+++ b/sources/shiboken2/tests/samplebinding/deprecated_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
-import warnings
+import os
+import sys
import unittest
+import warnings
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectType
diff --git a/sources/shiboken2/tests/samplebinding/derived_test.py b/sources/shiboken2/tests/samplebinding/derived_test.py
index 05cd648f5..81f3a8034 100644
--- a/sources/shiboken2/tests/samplebinding/derived_test.py
+++ b/sources/shiboken2/tests/samplebinding/derived_test.py
@@ -31,9 +31,14 @@
'''Test cases for Derived class'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
import sample
from sample import Abstract, Derived, OverloadedFuncEnum
diff --git a/sources/shiboken2/tests/samplebinding/duck_punching_test.py b/sources/shiboken2/tests/samplebinding/duck_punching_test.py
index efc8f344f..3f9d69b47 100644
--- a/sources/shiboken2/tests/samplebinding/duck_punching_test.py
+++ b/sources/shiboken2/tests/samplebinding/duck_punching_test.py
@@ -31,8 +31,14 @@
'''Test cases for virtual methods.'''
+import os
+import sys
import types
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from py3kcompat import IS_PY3K
from sample import VirtualMethods, SimpleFile, Point
diff --git a/sources/shiboken2/tests/samplebinding/echo_test.py b/sources/shiboken2/tests/samplebinding/echo_test.py
index b91394bb8..cd3fcc090 100644
--- a/sources/shiboken2/tests/samplebinding/echo_test.py
+++ b/sources/shiboken2/tests/samplebinding/echo_test.py
@@ -31,8 +31,14 @@
'''Test cases for <add-function> with const char* as argument'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Echo
class TestEcho(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/enum_test.py b/sources/shiboken2/tests/samplebinding/enum_test.py
index 7e1cac8c0..0beb72033 100644
--- a/sources/shiboken2/tests/samplebinding/enum_test.py
+++ b/sources/shiboken2/tests/samplebinding/enum_test.py
@@ -35,6 +35,13 @@ import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
+import shiboken2
+# This is needed after the introduction of BUILD_DIR.
+
import sample
from sample import SampleNamespace, ObjectType, Event
from py3kcompat import IS_PY3K, b
diff --git a/sources/shiboken2/tests/samplebinding/enumfromremovednamespace_test.py b/sources/shiboken2/tests/samplebinding/enumfromremovednamespace_test.py
index 5803a9975..4b0866c4e 100644
--- a/sources/shiboken2/tests/samplebinding/enumfromremovednamespace_test.py
+++ b/sources/shiboken2/tests/samplebinding/enumfromremovednamespace_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
import sample
class TestEnumFromRemovedNamespace(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/event_loop_call_virtual_test.py b/sources/shiboken2/tests/samplebinding/event_loop_call_virtual_test.py
index 63a5a8ab3..41b91ed70 100644
--- a/sources/shiboken2/tests/samplebinding/event_loop_call_virtual_test.py
+++ b/sources/shiboken2/tests/samplebinding/event_loop_call_virtual_test.py
@@ -30,8 +30,14 @@
'''Simple event loop dispatcher test.'''
+import os
+import sys
import time
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from random import random
from sample import ObjectType, Event
diff --git a/sources/shiboken2/tests/samplebinding/event_loop_thread_test.py b/sources/shiboken2/tests/samplebinding/event_loop_thread_test.py
index 1a1fe840d..4c63d0665 100644
--- a/sources/shiboken2/tests/samplebinding/event_loop_thread_test.py
+++ b/sources/shiboken2/tests/samplebinding/event_loop_thread_test.py
@@ -28,10 +28,16 @@
##
#############################################################################
+import os
+from random import random
+import sys
import time
import threading
import unittest
-from random import random
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectType, Event
diff --git a/sources/shiboken2/tests/samplebinding/exception_test.py b/sources/shiboken2/tests/samplebinding/exception_test.py
index d6c02433a..3224dfe17 100644
--- a/sources/shiboken2/tests/samplebinding/exception_test.py
+++ b/sources/shiboken2/tests/samplebinding/exception_test.py
@@ -28,8 +28,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ExceptionTest
class CppExceptionTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/filter_test.py b/sources/shiboken2/tests/samplebinding/filter_test.py
index 577a15bd2..b09d89980 100644
--- a/sources/shiboken2/tests/samplebinding/filter_test.py
+++ b/sources/shiboken2/tests/samplebinding/filter_test.py
@@ -26,8 +26,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Data, Intersection, Union
class TestFilters(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/handleholder_test.py b/sources/shiboken2/tests/samplebinding/handleholder_test.py
index c2504f4d2..a4cbd1c72 100644
--- a/sources/shiboken2/tests/samplebinding/handleholder_test.py
+++ b/sources/shiboken2/tests/samplebinding/handleholder_test.py
@@ -33,8 +33,14 @@
Test case for BUG #1105.
'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import HandleHolder
class HandleHolderTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/hashabletype_test.py b/sources/shiboken2/tests/samplebinding/hashabletype_test.py
index c628c1751..b985abaad 100644
--- a/sources/shiboken2/tests/samplebinding/hashabletype_test.py
+++ b/sources/shiboken2/tests/samplebinding/hashabletype_test.py
@@ -31,8 +31,14 @@
'''Test cases for __hash__'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
class HashableTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/ignorederefop_test.py b/sources/shiboken2/tests/samplebinding/ignorederefop_test.py
index c5f53a981..2237443b3 100644
--- a/sources/shiboken2/tests/samplebinding/ignorederefop_test.py
+++ b/sources/shiboken2/tests/samplebinding/ignorederefop_test.py
@@ -26,7 +26,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import *
class TestLackOfDereferenceOperators (unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/implicitconv_numerical_test.py b/sources/shiboken2/tests/samplebinding/implicitconv_numerical_test.py
index 6ebca790c..ebecf9ad8 100644
--- a/sources/shiboken2/tests/samplebinding/implicitconv_numerical_test.py
+++ b/sources/shiboken2/tests/samplebinding/implicitconv_numerical_test.py
@@ -31,7 +31,13 @@
'''Test case for inplicit converting C++ numeric types.'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
import sys
import sample
from py3kcompat import IS_PY3K, l, long
diff --git a/sources/shiboken2/tests/samplebinding/implicitconv_test.py b/sources/shiboken2/tests/samplebinding/implicitconv_test.py
index 30986d576..a6b770c9b 100644
--- a/sources/shiboken2/tests/samplebinding/implicitconv_test.py
+++ b/sources/shiboken2/tests/samplebinding/implicitconv_test.py
@@ -31,8 +31,14 @@
'''Test cases for implicit conversions'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ImplicitConv, ObjectType
class ImplicitConvTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/inheritanceandscope_test.py b/sources/shiboken2/tests/samplebinding/inheritanceandscope_test.py
index 892a2bc93..6b8a91573 100755..100644
--- a/sources/shiboken2/tests/samplebinding/inheritanceandscope_test.py
+++ b/sources/shiboken2/tests/samplebinding/inheritanceandscope_test.py
@@ -31,8 +31,14 @@
'''Test cases for finding scope in cases involving inheritance.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import SampleNamespace
class ScopeAndInheritanceTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/injectcode_test.py b/sources/shiboken2/tests/samplebinding/injectcode_test.py
index d6b1d0686..8bdcdbe61 100644
--- a/sources/shiboken2/tests/samplebinding/injectcode_test.py
+++ b/sources/shiboken2/tests/samplebinding/injectcode_test.py
@@ -31,7 +31,13 @@
'''Test cases for std::list container conversions'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import InjectCode
class MyInjectCode(InjectCode):
diff --git a/sources/shiboken2/tests/samplebinding/innerclass_test.py b/sources/shiboken2/tests/samplebinding/innerclass_test.py
index d76840f5c..287726587 100644
--- a/sources/shiboken2/tests/samplebinding/innerclass_test.py
+++ b/sources/shiboken2/tests/samplebinding/innerclass_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Derived
class TestInnerClass(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/intlist_test.py b/sources/shiboken2/tests/samplebinding/intlist_test.py
index 3bf8fb0ef..19043b99c 100644
--- a/sources/shiboken2/tests/samplebinding/intlist_test.py
+++ b/sources/shiboken2/tests/samplebinding/intlist_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import IntList
class IntListTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/invalid_virtual_return_test.py b/sources/shiboken2/tests/samplebinding/invalid_virtual_return_test.py
index 63384e737..36e583a4f 100644
--- a/sources/shiboken2/tests/samplebinding/invalid_virtual_return_test.py
+++ b/sources/shiboken2/tests/samplebinding/invalid_virtual_return_test.py
@@ -31,7 +31,13 @@
'''Test case for returning invalid types in a virtual function'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectModel, ObjectType, ObjectView
import warnings
diff --git a/sources/shiboken2/tests/samplebinding/keep_reference_test.py b/sources/shiboken2/tests/samplebinding/keep_reference_test.py
index bcfc0db1b..db3ddc2d4 100644
--- a/sources/shiboken2/tests/samplebinding/keep_reference_test.py
+++ b/sources/shiboken2/tests/samplebinding/keep_reference_test.py
@@ -31,8 +31,14 @@
'''Test case for objects that keep references to other object without owning them (e.g. model/view relationships).'''
-import unittest
+import os
+import sys
from sys import getrefcount
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectModel, ObjectView
diff --git a/sources/shiboken2/tests/samplebinding/list_test.py b/sources/shiboken2/tests/samplebinding/list_test.py
index a2761bee3..74091422c 100644
--- a/sources/shiboken2/tests/samplebinding/list_test.py
+++ b/sources/shiboken2/tests/samplebinding/list_test.py
@@ -31,8 +31,14 @@
'''Test cases for std::list container conversions'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ListUser, Point, PointF
class ExtendedListUser(ListUser):
diff --git a/sources/shiboken2/tests/samplebinding/lock_test.py b/sources/shiboken2/tests/samplebinding/lock_test.py
index 9bb1f8789..93c632e34 100644
--- a/sources/shiboken2/tests/samplebinding/lock_test.py
+++ b/sources/shiboken2/tests/samplebinding/lock_test.py
@@ -31,8 +31,14 @@
'''Simple test with a blocking C++ method that should allow python
threads to run.'''
-import unittest
+import os
+import sys
import threading
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import Bucket
diff --git a/sources/shiboken2/tests/samplebinding/map_test.py b/sources/shiboken2/tests/samplebinding/map_test.py
index 1d8d758d8..f6696c3d8 100644
--- a/sources/shiboken2/tests/samplebinding/map_test.py
+++ b/sources/shiboken2/tests/samplebinding/map_test.py
@@ -31,8 +31,14 @@
'''Test cases for std::map container conversions'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import MapUser
class ExtendedMapUser(MapUser):
diff --git a/sources/shiboken2/tests/samplebinding/metaclass_test.py b/sources/shiboken2/tests/samplebinding/metaclass_test.py
index e5da496c5..ad4c08f0d 100644
--- a/sources/shiboken2/tests/samplebinding/metaclass_test.py
+++ b/sources/shiboken2/tests/samplebinding/metaclass_test.py
@@ -26,9 +26,16 @@
##
#############################################################################
-from sample import *
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
+from sample import *
+
class MetaA(type):
pass
diff --git a/sources/shiboken2/tests/samplebinding/mi_virtual_methods_test.py b/sources/shiboken2/tests/samplebinding/mi_virtual_methods_test.py
index 585a1a2df..aea8a4d46 100644
--- a/sources/shiboken2/tests/samplebinding/mi_virtual_methods_test.py
+++ b/sources/shiboken2/tests/samplebinding/mi_virtual_methods_test.py
@@ -31,8 +31,14 @@
'''Test cases for virtual methods in multiple inheritance scenarios'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import VirtualMethods, ObjectType, Event
diff --git a/sources/shiboken2/tests/samplebinding/mixed_mi_test.py b/sources/shiboken2/tests/samplebinding/mixed_mi_test.py
index dd557d4f6..d33d033ba 100644
--- a/sources/shiboken2/tests/samplebinding/mixed_mi_test.py
+++ b/sources/shiboken2/tests/samplebinding/mixed_mi_test.py
@@ -31,8 +31,14 @@
'''Test cases for multiple inheritance in mixed Python/C++ scenarios'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ObjectType
diff --git a/sources/shiboken2/tests/samplebinding/modelindex_test.py b/sources/shiboken2/tests/samplebinding/modelindex_test.py
index 251ee710a..905d14269 100644
--- a/sources/shiboken2/tests/samplebinding/modelindex_test.py
+++ b/sources/shiboken2/tests/samplebinding/modelindex_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ModelIndex, ReferentModelIndex, PersistentModelIndex
class TestCastOperator(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/modelview_test.py b/sources/shiboken2/tests/samplebinding/modelview_test.py
index 3f86fe4ea..f421ca41d 100644
--- a/sources/shiboken2/tests/samplebinding/modelview_test.py
+++ b/sources/shiboken2/tests/samplebinding/modelview_test.py
@@ -31,7 +31,13 @@
'''Test case for objects that keep references to other object without owning them (e.g. model/view relationships).'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectModel, ObjectType, ObjectView
diff --git a/sources/shiboken2/tests/samplebinding/modifications_test.py b/sources/shiboken2/tests/samplebinding/modifications_test.py
index 1dcd50359..e6e9c5626 100644
--- a/sources/shiboken2/tests/samplebinding/modifications_test.py
+++ b/sources/shiboken2/tests/samplebinding/modifications_test.py
@@ -31,8 +31,14 @@
'''Test cases for method modifications performed as described on type system. '''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Modifications, Point, ByteArray
class ExtModifications(Modifications):
@@ -220,5 +226,15 @@ class ModificationsTest(unittest.TestCase):
self.assertTrue(isinstance(res, float))
self.assertEqual(res, em.increment)
+ def testDefaultValueModifications(self):
+ # PSYIDE-1095: setEnumValue() has the default value modified to
+ # calling defaultEnumValue() which returns Modifications.TestEnumValue2.
+ # This used to generated broken code since defaultEnumValue() was
+ # qualified by the enum scope.
+ modifications = Modifications()
+ modifications.setEnumValue()
+ self.assertEqual(modifications.enumValue(), Modifications.TestEnumValue2)
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/sources/shiboken2/tests/samplebinding/modified_constructor_test.py b/sources/shiboken2/tests/samplebinding/modified_constructor_test.py
index 3352cd277..11d931c5f 100644
--- a/sources/shiboken2/tests/samplebinding/modified_constructor_test.py
+++ b/sources/shiboken2/tests/samplebinding/modified_constructor_test.py
@@ -32,8 +32,14 @@
'''Tests cases for ConstructorWithModifiedArgument class.'''
import sys
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
diff --git a/sources/shiboken2/tests/samplebinding/modifiedvirtualmethods_test.py b/sources/shiboken2/tests/samplebinding/modifiedvirtualmethods_test.py
index 53b854530..c15a0db08 100644
--- a/sources/shiboken2/tests/samplebinding/modifiedvirtualmethods_test.py
+++ b/sources/shiboken2/tests/samplebinding/modifiedvirtualmethods_test.py
@@ -31,8 +31,14 @@
'''Test cases for modified virtual methods.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import VirtualMethods, Str
class ExtendedVirtualMethods(VirtualMethods):
diff --git a/sources/shiboken2/tests/samplebinding/multi_cpp_inheritance_test.py b/sources/shiboken2/tests/samplebinding/multi_cpp_inheritance_test.py
index 5223f316a..c64a29e8e 100644
--- a/sources/shiboken2/tests/samplebinding/multi_cpp_inheritance_test.py
+++ b/sources/shiboken2/tests/samplebinding/multi_cpp_inheritance_test.py
@@ -31,9 +31,14 @@
'''Test cases for multiple inheritance'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
class SimpleUseCase(ObjectType, Str):
diff --git a/sources/shiboken2/tests/samplebinding/multiple_derived_test.py b/sources/shiboken2/tests/samplebinding/multiple_derived_test.py
index 9ac206db3..650af8602 100644
--- a/sources/shiboken2/tests/samplebinding/multiple_derived_test.py
+++ b/sources/shiboken2/tests/samplebinding/multiple_derived_test.py
@@ -31,9 +31,14 @@
'''Test cases for multiple inheritance'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Base1, Base2, Base3, Base4, Base5, Base6
from sample import MDerived1, MDerived2, MDerived3, MDerived4, MDerived5, SonOfMDerived1
diff --git a/sources/shiboken2/tests/samplebinding/namespace_test.py b/sources/shiboken2/tests/samplebinding/namespace_test.py
index 5fcdab974..aeaf81cff 100644
--- a/sources/shiboken2/tests/samplebinding/namespace_test.py
+++ b/sources/shiboken2/tests/samplebinding/namespace_test.py
@@ -31,7 +31,14 @@
'''Test cases for std::map container conversions'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
diff --git a/sources/shiboken2/tests/samplebinding/newdivision_test.py b/sources/shiboken2/tests/samplebinding/newdivision_test.py
index 331d7b365..d352c1b91 100644
--- a/sources/shiboken2/tests/samplebinding/newdivision_test.py
+++ b/sources/shiboken2/tests/samplebinding/newdivision_test.py
@@ -27,9 +27,17 @@
#############################################################################
from __future__ import division
-from sample import *
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
+from sample import *
+
+
class TestNewDivision(unittest.TestCase):
def testIt(self):
diff --git a/sources/shiboken2/tests/samplebinding/nondefaultctor_test.py b/sources/shiboken2/tests/samplebinding/nondefaultctor_test.py
index 86a05fd78..68d083136 100644
--- a/sources/shiboken2/tests/samplebinding/nondefaultctor_test.py
+++ b/sources/shiboken2/tests/samplebinding/nondefaultctor_test.py
@@ -31,9 +31,14 @@
'''Test cases for ...'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import NonDefaultCtor
class DerivedNonDefaultCtor (NonDefaultCtor):
diff --git a/sources/shiboken2/tests/samplebinding/nontypetemplate_test.py b/sources/shiboken2/tests/samplebinding/nontypetemplate_test.py
index a7a4da72b..7c4729b4f 100644
--- a/sources/shiboken2/tests/samplebinding/nontypetemplate_test.py
+++ b/sources/shiboken2/tests/samplebinding/nontypetemplate_test.py
@@ -36,8 +36,14 @@ try:
except ImportError:
pass
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import IntArray2, IntArray3
class NonTypeTemplateTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/nonzero_test.py b/sources/shiboken2/tests/samplebinding/nonzero_test.py
index 138a92264..214b2f7bd 100644
--- a/sources/shiboken2/tests/samplebinding/nonzero_test.py
+++ b/sources/shiboken2/tests/samplebinding/nonzero_test.py
@@ -29,7 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
class TestNonZeroOperator(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/numericaltypedef_test.py b/sources/shiboken2/tests/samplebinding/numericaltypedef_test.py
index f82e23424..de9128cbc 100644
--- a/sources/shiboken2/tests/samplebinding/numericaltypedef_test.py
+++ b/sources/shiboken2/tests/samplebinding/numericaltypedef_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import SizeF
class NumericalTypedefTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/numpy_test.py b/sources/shiboken2/tests/samplebinding/numpy_test.py
index 90b97992a..3f67f59e4 100644
--- a/sources/shiboken2/tests/samplebinding/numpy_test.py
+++ b/sources/shiboken2/tests/samplebinding/numpy_test.py
@@ -36,7 +36,13 @@ try:
except:
sys.exit(0)
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import PointF
class TestNumpyTypes(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/objecttype_test.py b/sources/shiboken2/tests/samplebinding/objecttype_test.py
index f1a06c2b1..1d7f70722 100644
--- a/sources/shiboken2/tests/samplebinding/objecttype_test.py
+++ b/sources/shiboken2/tests/samplebinding/objecttype_test.py
@@ -31,7 +31,13 @@
'''Tests ObjectType class of object-type with privates copy constructor and = operator.'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
import sys
from sample import ObjectType, Str
diff --git a/sources/shiboken2/tests/samplebinding/objecttype_with_named_args_test.py b/sources/shiboken2/tests/samplebinding/objecttype_with_named_args_test.py
index 846ae5108..ce7874c23 100755..100644
--- a/sources/shiboken2/tests/samplebinding/objecttype_with_named_args_test.py
+++ b/sources/shiboken2/tests/samplebinding/objecttype_with_named_args_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ObjectType
class NamedArgsTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/objecttypebyvalue_test.py b/sources/shiboken2/tests/samplebinding/objecttypebyvalue_test.py
index 31cbe29cc..080a51ce5 100644
--- a/sources/shiboken2/tests/samplebinding/objecttypebyvalue_test.py
+++ b/sources/shiboken2/tests/samplebinding/objecttypebyvalue_test.py
@@ -26,9 +26,17 @@
##
#############################################################################
-from sample import *
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
+from sample import *
+
+
class ObjectTypeByValueTest (unittest.TestCase):
def testIt(self):
factory = ObjectTypeByValue()
diff --git a/sources/shiboken2/tests/samplebinding/objecttypelayout_test.py b/sources/shiboken2/tests/samplebinding/objecttypelayout_test.py
index 62f6ce731..bcf30eb43 100644
--- a/sources/shiboken2/tests/samplebinding/objecttypelayout_test.py
+++ b/sources/shiboken2/tests/samplebinding/objecttypelayout_test.py
@@ -31,9 +31,14 @@
'''Tests cases for ObjectTypeLayout class.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
diff --git a/sources/shiboken2/tests/samplebinding/objecttypeoperators_test.py b/sources/shiboken2/tests/samplebinding/objecttypeoperators_test.py
index fa6c2f5b0..fb0d52319 100644
--- a/sources/shiboken2/tests/samplebinding/objecttypeoperators_test.py
+++ b/sources/shiboken2/tests/samplebinding/objecttypeoperators_test.py
@@ -29,7 +29,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import *
class ObjectTypeOperatorsTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/objecttypereferenceasvirtualmethodargument_test.py b/sources/shiboken2/tests/samplebinding/objecttypereferenceasvirtualmethodargument_test.py
index b9ab554dc..40adb94ed 100644
--- a/sources/shiboken2/tests/samplebinding/objecttypereferenceasvirtualmethodargument_test.py
+++ b/sources/shiboken2/tests/samplebinding/objecttypereferenceasvirtualmethodargument_test.py
@@ -29,7 +29,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectTypeHolder
class TestObjectTypeReferenceAsVirtualMethodArgument(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/oddbool_test.py b/sources/shiboken2/tests/samplebinding/oddbool_test.py
index f99645bc6..de1429604 100644
--- a/sources/shiboken2/tests/samplebinding/oddbool_test.py
+++ b/sources/shiboken2/tests/samplebinding/oddbool_test.py
@@ -31,8 +31,14 @@
'''Test cases for OddBool user's primitive type conversion.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import OddBoolUser
class DerivedOddBoolUser (OddBoolUser):
diff --git a/sources/shiboken2/tests/samplebinding/oldstyleclass_as_number_test.py b/sources/shiboken2/tests/samplebinding/oldstyleclass_as_number_test.py
index 8852e152d..e0f864636 100644
--- a/sources/shiboken2/tests/samplebinding/oldstyleclass_as_number_test.py
+++ b/sources/shiboken2/tests/samplebinding/oldstyleclass_as_number_test.py
@@ -29,7 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
import sample
from py3kcompat import IS_PY3K
diff --git a/sources/shiboken2/tests/samplebinding/onlycopyclass_test.py b/sources/shiboken2/tests/samplebinding/onlycopyclass_test.py
index 43a095137..ccf71f4f8 100644
--- a/sources/shiboken2/tests/samplebinding/onlycopyclass_test.py
+++ b/sources/shiboken2/tests/samplebinding/onlycopyclass_test.py
@@ -29,7 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import OnlyCopy, FriendOfOnlyCopy
class ClassWithOnlyCopyCtorTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/overflow_test.py b/sources/shiboken2/tests/samplebinding/overflow_test.py
index b7a1006fe..56a5d98c7 100644
--- a/sources/shiboken2/tests/samplebinding/overflow_test.py
+++ b/sources/shiboken2/tests/samplebinding/overflow_test.py
@@ -31,9 +31,14 @@
'''Test case for overflowing C++ numeric types.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
from py3kcompat import IS_PY3K, long
diff --git a/sources/shiboken2/tests/samplebinding/overload_sorting_test.py b/sources/shiboken2/tests/samplebinding/overload_sorting_test.py
index b3b0f7c43..8132e4e3d 100644
--- a/sources/shiboken2/tests/samplebinding/overload_sorting_test.py
+++ b/sources/shiboken2/tests/samplebinding/overload_sorting_test.py
@@ -31,8 +31,14 @@
'''Test cases for overload sorting'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
class Dummy(object):
diff --git a/sources/shiboken2/tests/samplebinding/overload_test.py b/sources/shiboken2/tests/samplebinding/overload_test.py
index 0cc9e4250..ab5230990 100644
--- a/sources/shiboken2/tests/samplebinding/overload_test.py
+++ b/sources/shiboken2/tests/samplebinding/overload_test.py
@@ -31,7 +31,13 @@
'''Test cases for Overload class'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import Echo, Overload, Point, PointF, Polygon, Rect, RectF, Size, Str
diff --git a/sources/shiboken2/tests/samplebinding/overloadwithdefault_test.py b/sources/shiboken2/tests/samplebinding/overloadwithdefault_test.py
index 8db9726c8..dbd318091 100644
--- a/sources/shiboken2/tests/samplebinding/overloadwithdefault_test.py
+++ b/sources/shiboken2/tests/samplebinding/overloadwithdefault_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Overload, Str
from py3kcompat import b
diff --git a/sources/shiboken2/tests/samplebinding/ownership_argument_invalidation_test.py b/sources/shiboken2/tests/samplebinding/ownership_argument_invalidation_test.py
index e0b79daa7..d96236c2c 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_argument_invalidation_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_argument_invalidation_test.py
@@ -31,9 +31,14 @@
'''Wrapper validity tests for arguments.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Polygon, Point
class WrapperValidityOfArgumentsTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/ownership_delete_child_in_cpp_test.py b/sources/shiboken2/tests/samplebinding/ownership_delete_child_in_cpp_test.py
index f0081385a..255f1fdb1 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_delete_child_in_cpp_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_delete_child_in_cpp_test.py
@@ -31,8 +31,14 @@
'''Tests for destroy a child object in C++'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ObjectType
diff --git a/sources/shiboken2/tests/samplebinding/ownership_delete_child_in_python_test.py b/sources/shiboken2/tests/samplebinding/ownership_delete_child_in_python_test.py
index cac52113d..206a65ce9 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_delete_child_in_python_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_delete_child_in_python_test.py
@@ -31,9 +31,15 @@
'''Tests for deleting a child object in python'''
-import unittest
+import os
import random
import string
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectType
from py3kcompat import IS_PY3K
diff --git a/sources/shiboken2/tests/samplebinding/ownership_delete_parent_test.py b/sources/shiboken2/tests/samplebinding/ownership_delete_parent_test.py
index cc317df19..1b7de5f2f 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_delete_parent_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_delete_parent_test.py
@@ -31,9 +31,14 @@
'''Tests for destroying the parent'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ObjectType
diff --git a/sources/shiboken2/tests/samplebinding/ownership_invalidate_after_use_test.py b/sources/shiboken2/tests/samplebinding/ownership_invalidate_after_use_test.py
index e73b5a8ac..10f1cf9ee 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_invalidate_after_use_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_invalidate_after_use_test.py
@@ -31,9 +31,14 @@
'''Ownership tests for cases of invalidation of Python wrapper after use.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ObjectType, ObjectTypeDerived, Event
diff --git a/sources/shiboken2/tests/samplebinding/ownership_invalidate_child_test.py b/sources/shiboken2/tests/samplebinding/ownership_invalidate_child_test.py
index 59bf3f3df..9e6423e50 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_invalidate_child_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_invalidate_child_test.py
@@ -31,8 +31,14 @@
'''Tests for invalidating a C++ created child that was already on the care of a parent.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ObjectType, BlackBox
diff --git a/sources/shiboken2/tests/samplebinding/ownership_invalidate_nonpolymorphic_test.py b/sources/shiboken2/tests/samplebinding/ownership_invalidate_nonpolymorphic_test.py
index d64a2120c..18fce3809 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_invalidate_nonpolymorphic_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_invalidate_nonpolymorphic_test.py
@@ -31,9 +31,14 @@
'''The BlackBox class has cases of ownership transference between Python and C++.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Point, BlackBox
class OwnershipInvalidateNonPolymorphicTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/ownership_invalidate_parent_test.py b/sources/shiboken2/tests/samplebinding/ownership_invalidate_parent_test.py
index 42b516ff2..2d7e67deb 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_invalidate_parent_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_invalidate_parent_test.py
@@ -31,8 +31,14 @@
'''Tests for invalidating a parent of other objects.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ObjectType, BlackBox
diff --git a/sources/shiboken2/tests/samplebinding/ownership_reparenting_test.py b/sources/shiboken2/tests/samplebinding/ownership_reparenting_test.py
index 1a7ea2379..217566996 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_reparenting_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_reparenting_test.py
@@ -31,7 +31,13 @@
'''Tests for object reparenting.'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
import sys
from sample import ObjectType
diff --git a/sources/shiboken2/tests/samplebinding/ownership_transference_test.py b/sources/shiboken2/tests/samplebinding/ownership_transference_test.py
index 42b576a4d..1a783458e 100644
--- a/sources/shiboken2/tests/samplebinding/ownership_transference_test.py
+++ b/sources/shiboken2/tests/samplebinding/ownership_transference_test.py
@@ -31,9 +31,14 @@
'''The BlackBox class has cases of ownership transference between C++ and Python.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ObjectType, BlackBox
class BlackBoxTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/pair_test.py b/sources/shiboken2/tests/samplebinding/pair_test.py
index ac0653dbe..65fd9b99c 100644
--- a/sources/shiboken2/tests/samplebinding/pair_test.py
+++ b/sources/shiboken2/tests/samplebinding/pair_test.py
@@ -31,9 +31,14 @@
'''Test cases for std::pair container conversions'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import PairUser
class ExtendedPairUser(PairUser):
diff --git a/sources/shiboken2/tests/samplebinding/pen_test.py b/sources/shiboken2/tests/samplebinding/pen_test.py
index 2a61ae367..89abf4d54 100644
--- a/sources/shiboken2/tests/samplebinding/pen_test.py
+++ b/sources/shiboken2/tests/samplebinding/pen_test.py
@@ -31,8 +31,14 @@
'''Test cases for <add-function> with const char* as argument'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Color, Pen, SampleNamespace
class TestPen(unittest.TestCase):
@@ -57,6 +63,8 @@ class TestPen(unittest.TestCase):
def testPenWithIntConvertedToColor(self):
pen = Pen(1)
self.assertEqual(pen.ctorType(), Pen.ColorCtor)
+ pen.drawLine(0, 0, 5, 5)
+
if __name__ == '__main__':
unittest.main()
diff --git a/sources/shiboken2/tests/samplebinding/point_test.py b/sources/shiboken2/tests/samplebinding/point_test.py
index d6498d4b3..e2beb78ae 100644
--- a/sources/shiboken2/tests/samplebinding/point_test.py
+++ b/sources/shiboken2/tests/samplebinding/point_test.py
@@ -31,9 +31,14 @@
'''Test cases for Point class'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Point
from py3kcompat import unicode
diff --git a/sources/shiboken2/tests/samplebinding/pointerholder_test.py b/sources/shiboken2/tests/samplebinding/pointerholder_test.py
index e427e0435..b79eaa33a 100644
--- a/sources/shiboken2/tests/samplebinding/pointerholder_test.py
+++ b/sources/shiboken2/tests/samplebinding/pointerholder_test.py
@@ -31,9 +31,14 @@
'''Test cases for a class that holds an arbitraty pointer and is modified to hold an PyObject.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import PointerHolder
class TestPointerHolder(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py b/sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py
index c40770862..532f2226c 100644
--- a/sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py
+++ b/sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py
@@ -44,7 +44,13 @@ because typing.Sequence is a subclass, but we will generalize this
to typing.Iterable in the future.
"""
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import IntArray2, VirtualMethods
import shiboken2
diff --git a/sources/shiboken2/tests/samplebinding/pointf_test.py b/sources/shiboken2/tests/samplebinding/pointf_test.py
index 8d8b47115..e9630fe40 100644
--- a/sources/shiboken2/tests/samplebinding/pointf_test.py
+++ b/sources/shiboken2/tests/samplebinding/pointf_test.py
@@ -31,8 +31,14 @@
'''Test cases for PointF class'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import PointF
class PointFTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/primitivereferenceargument_test.py b/sources/shiboken2/tests/samplebinding/primitivereferenceargument_test.py
index ef0e153e9..95c210b23 100644
--- a/sources/shiboken2/tests/samplebinding/primitivereferenceargument_test.py
+++ b/sources/shiboken2/tests/samplebinding/primitivereferenceargument_test.py
@@ -29,7 +29,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
import sample
class PrimitiveReferenceArgumentTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/privatector_test.py b/sources/shiboken2/tests/samplebinding/privatector_test.py
index e972512fb..7dc3d6651 100644
--- a/sources/shiboken2/tests/samplebinding/privatector_test.py
+++ b/sources/shiboken2/tests/samplebinding/privatector_test.py
@@ -32,9 +32,14 @@
'''Test cases for a class with only a private constructor.'''
import gc
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import PrivateCtor
diff --git a/sources/shiboken2/tests/samplebinding/privatedtor_test.py b/sources/shiboken2/tests/samplebinding/privatedtor_test.py
index 478506779..97d034729 100644
--- a/sources/shiboken2/tests/samplebinding/privatedtor_test.py
+++ b/sources/shiboken2/tests/samplebinding/privatedtor_test.py
@@ -32,9 +32,14 @@
'''Test cases for a class with a private destructor.'''
import gc
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
import shiboken2 as shiboken
from sample import PrivateDtor
diff --git a/sources/shiboken2/tests/samplebinding/protected_test.py b/sources/shiboken2/tests/samplebinding/protected_test.py
index d343405ad..0cfc69b12 100644
--- a/sources/shiboken2/tests/samplebinding/protected_test.py
+++ b/sources/shiboken2/tests/samplebinding/protected_test.py
@@ -31,8 +31,14 @@
'''Test cases for protected methods.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import cacheSize
from sample import ProtectedNonPolymorphic, ProtectedVirtualDestructor
from sample import ProtectedPolymorphic, ProtectedPolymorphicDaughter, ProtectedPolymorphicGrandDaughter
diff --git a/sources/shiboken2/tests/samplebinding/pstrlist_test.py b/sources/shiboken2/tests/samplebinding/pstrlist_test.py
index 5ecccd075..04492de33 100644
--- a/sources/shiboken2/tests/samplebinding/pstrlist_test.py
+++ b/sources/shiboken2/tests/samplebinding/pstrlist_test.py
@@ -29,7 +29,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
import sample
class PStrListTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/pystr_test.py b/sources/shiboken2/tests/samplebinding/pystr_test.py
index 2aa4da40c..b69cf369e 100644
--- a/sources/shiboken2/tests/samplebinding/pystr_test.py
+++ b/sources/shiboken2/tests/samplebinding/pystr_test.py
@@ -31,9 +31,14 @@
'''Test cases for definition of __str__ method.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Point
class PyStrTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/python_thread_test.py b/sources/shiboken2/tests/samplebinding/python_thread_test.py
index 2015c8ed3..56b927367 100644
--- a/sources/shiboken2/tests/samplebinding/python_thread_test.py
+++ b/sources/shiboken2/tests/samplebinding/python_thread_test.py
@@ -30,16 +30,22 @@
'''Tests for using Shiboken-based bindings with python threads'''
-import unittest
+import logging
+import os
+from random import random
+import sys
import threading
-import sample
import time
+import unittest
-import logging
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
+import sample
#logging.basicConfig(level=logging.DEBUG)
-from random import random
class Producer(threading.Thread):
'''Producer thread'''
diff --git a/sources/shiboken2/tests/samplebinding/receive_null_cstring_test.py b/sources/shiboken2/tests/samplebinding/receive_null_cstring_test.py
index 68de49376..8023aead0 100644
--- a/sources/shiboken2/tests/samplebinding/receive_null_cstring_test.py
+++ b/sources/shiboken2/tests/samplebinding/receive_null_cstring_test.py
@@ -31,8 +31,14 @@
'''Test case for a function that could receive a NULL pointer in a '[const] char*' parameter.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import countCharacters
class ReceiveNullCStringTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/reference_test.py b/sources/shiboken2/tests/samplebinding/reference_test.py
index 152730fad..7ff806692 100644
--- a/sources/shiboken2/tests/samplebinding/reference_test.py
+++ b/sources/shiboken2/tests/samplebinding/reference_test.py
@@ -31,9 +31,14 @@
'''Test cases for methods that receive references to objects.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
class ExtendedReference(Reference):
diff --git a/sources/shiboken2/tests/samplebinding/referencetopointer_test.py b/sources/shiboken2/tests/samplebinding/referencetopointer_test.py
index 5a02c5943..240719e4b 100644
--- a/sources/shiboken2/tests/samplebinding/referencetopointer_test.py
+++ b/sources/shiboken2/tests/samplebinding/referencetopointer_test.py
@@ -31,8 +31,14 @@
'''Test cases for a reference to pointer argument type.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import VirtualMethods, Str
class ExtendedVirtualMethods(VirtualMethods):
diff --git a/sources/shiboken2/tests/samplebinding/return_null_test.py b/sources/shiboken2/tests/samplebinding/return_null_test.py
index 15abb8b02..85764679b 100644
--- a/sources/shiboken2/tests/samplebinding/return_null_test.py
+++ b/sources/shiboken2/tests/samplebinding/return_null_test.py
@@ -31,9 +31,14 @@
'''Test case for functions that could return a NULL pointer.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import returnNullPrimitivePointer, returnNullValueTypePointer, returnNullObjectTypePointer
class ReturnNullTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/richcompare_test.py b/sources/shiboken2/tests/samplebinding/richcompare_test.py
index b219addc5..bcda390c3 100644
--- a/sources/shiboken2/tests/samplebinding/richcompare_test.py
+++ b/sources/shiboken2/tests/samplebinding/richcompare_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
class TestRichCompare(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/sample_test.py b/sources/shiboken2/tests/samplebinding/sample_test.py
index 94cf4f5e3..d6cf82f9a 100644
--- a/sources/shiboken2/tests/samplebinding/sample_test.py
+++ b/sources/shiboken2/tests/samplebinding/sample_test.py
@@ -31,8 +31,14 @@
'''Test cases for libsample bindings module'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
import sample
class ModuleTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/simplefile_test.py b/sources/shiboken2/tests/samplebinding/simplefile_test.py
index 2a42942f7..4a841be80 100644
--- a/sources/shiboken2/tests/samplebinding/simplefile_test.py
+++ b/sources/shiboken2/tests/samplebinding/simplefile_test.py
@@ -32,8 +32,13 @@
'''Test cases for SimpleFile class'''
import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import SimpleFile
class SimpleFileTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/size_test.py b/sources/shiboken2/tests/samplebinding/size_test.py
index b7547d53f..53626c961 100644
--- a/sources/shiboken2/tests/samplebinding/size_test.py
+++ b/sources/shiboken2/tests/samplebinding/size_test.py
@@ -31,8 +31,14 @@
'''Test cases for operator overloads on Size class'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Size
class PointTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/static_nonstatic_methods_test.py b/sources/shiboken2/tests/samplebinding/static_nonstatic_methods_test.py
index 9b5c1e029..cd1a8a4f0 100644
--- a/sources/shiboken2/tests/samplebinding/static_nonstatic_methods_test.py
+++ b/sources/shiboken2/tests/samplebinding/static_nonstatic_methods_test.py
@@ -32,8 +32,13 @@
'''Test cases for overloads involving static and non-static versions of a method.'''
import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import SimpleFile
class SimpleFile2 (SimpleFile):
diff --git a/sources/shiboken2/tests/samplebinding/str_test.py b/sources/shiboken2/tests/samplebinding/str_test.py
index a5ead4783..15df1f55a 100644
--- a/sources/shiboken2/tests/samplebinding/str_test.py
+++ b/sources/shiboken2/tests/samplebinding/str_test.py
@@ -31,8 +31,14 @@
'''Test cases for a method that receives a reference to class that is implicitly convertible from a Python native type.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Str
class StrTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/strlist_test.py b/sources/shiboken2/tests/samplebinding/strlist_test.py
index 787374b73..57537f061 100644
--- a/sources/shiboken2/tests/samplebinding/strlist_test.py
+++ b/sources/shiboken2/tests/samplebinding/strlist_test.py
@@ -31,8 +31,14 @@
'''Test cases for StrList class that inherits from std::list<Str>.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Str, StrList
class StrListTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/templateinheritingclass_test.py b/sources/shiboken2/tests/samplebinding/templateinheritingclass_test.py
index 914a3e28e..bc66b208f 100644
--- a/sources/shiboken2/tests/samplebinding/templateinheritingclass_test.py
+++ b/sources/shiboken2/tests/samplebinding/templateinheritingclass_test.py
@@ -29,7 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Photon
'''This tests classes that inherit from template classes,
diff --git a/sources/shiboken2/tests/samplebinding/time_test.py b/sources/shiboken2/tests/samplebinding/time_test.py
index 1882ffc5c..f8b35e7b7 100644
--- a/sources/shiboken2/tests/samplebinding/time_test.py
+++ b/sources/shiboken2/tests/samplebinding/time_test.py
@@ -32,7 +32,13 @@
'''Test cases for constructor and method signature decisor on Time class.'''
import sys
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
import datetime
from sample import Time, ImplicitConv, ObjectType
diff --git a/sources/shiboken2/tests/samplebinding/transform_test.py b/sources/shiboken2/tests/samplebinding/transform_test.py
index 51839dbf0..5369ec466 100644
--- a/sources/shiboken2/tests/samplebinding/transform_test.py
+++ b/sources/shiboken2/tests/samplebinding/transform_test.py
@@ -31,8 +31,14 @@
'''Test cases for argument modification with more than nine arguments.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Point, applyHomogeneousTransform
class TransformTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/typeconverters_test.py b/sources/shiboken2/tests/samplebinding/typeconverters_test.py
index 46e2dd57c..33f3b62e5 100644
--- a/sources/shiboken2/tests/samplebinding/typeconverters_test.py
+++ b/sources/shiboken2/tests/samplebinding/typeconverters_test.py
@@ -31,7 +31,14 @@
'''Tests various usages of the type converters.'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
import sample
class GetPythonTypeByNameTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/typedealloc_test.py b/sources/shiboken2/tests/samplebinding/typedealloc_test.py
index 8f0371d16..b79b6de0e 100644
--- a/sources/shiboken2/tests/samplebinding/typedealloc_test.py
+++ b/sources/shiboken2/tests/samplebinding/typedealloc_test.py
@@ -32,8 +32,14 @@
'''Test deallocation of type extended in Python.'''
import gc
-import weakref
+import os
+import sys
import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import Point
diff --git a/sources/shiboken2/tests/samplebinding/typedtordoublefree_test.py b/sources/shiboken2/tests/samplebinding/typedtordoublefree_test.py
index e1fbc4406..8cf93866f 100644
--- a/sources/shiboken2/tests/samplebinding/typedtordoublefree_test.py
+++ b/sources/shiboken2/tests/samplebinding/typedtordoublefree_test.py
@@ -29,7 +29,13 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectType
class TestTypeDestructorDoubleFree(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
index 19b4948a1..3aaecf247 100644
--- a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
+++ b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
@@ -227,7 +227,6 @@
</modify-argument>
<modify-argument index="1">
<replace-type modified-type="PStr"/>
- <remove-default-expression/>
<replace-default-expression with="PStr()"/>
</modify-argument>
<inject-code class="target" position="end">
@@ -956,6 +955,7 @@
<object-type name="Modifications">
<enum-type name="OverloadedModFunc"/>
+ <enum-type name="TestEnum"/>
<modify-function signature="overloaded(int, bool, int, double)">
<modify-argument index="2">
@@ -1287,6 +1287,11 @@
%PYARG_0 = %CONVERTTOPYTHON[OddBool](%0);
</inject-code>
</modify-function>
+ <modify-function signature="setEnumValue(Modifications::TestEnum)">
+ <modify-argument index="1">
+ <replace-default-expression with="cppSelf->defaultEnumValue()"/>
+ </modify-argument>
+ </modify-function>
</object-type>
<object-type name="AbstractModifications">
@@ -2305,6 +2310,7 @@
<value-type name="Color" />
<value-type name="Pen">
<enum-type identified-by-value="EnumCtor"/>
+ <enum-type name="RenderHints"/>
</value-type>
<value-type name="CtorConvRule">
diff --git a/sources/shiboken2/tests/samplebinding/unsafe_parent_test.py b/sources/shiboken2/tests/samplebinding/unsafe_parent_test.py
index 9e50dabf6..1387e308c 100644
--- a/sources/shiboken2/tests/samplebinding/unsafe_parent_test.py
+++ b/sources/shiboken2/tests/samplebinding/unsafe_parent_test.py
@@ -31,9 +31,14 @@
'''Test cases for ...'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import ObjectType
class DerivedObjectType(ObjectType):
diff --git a/sources/shiboken2/tests/samplebinding/useraddedctor_test.py b/sources/shiboken2/tests/samplebinding/useraddedctor_test.py
index 17635259d..f59fb3533 100644
--- a/sources/shiboken2/tests/samplebinding/useraddedctor_test.py
+++ b/sources/shiboken2/tests/samplebinding/useraddedctor_test.py
@@ -31,7 +31,13 @@
'''Test cases for user added constructors'''
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import *
class PointTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/virtualdtor_test.py b/sources/shiboken2/tests/samplebinding/virtualdtor_test.py
index 388dc29dc..365d31f59 100644
--- a/sources/shiboken2/tests/samplebinding/virtualdtor_test.py
+++ b/sources/shiboken2/tests/samplebinding/virtualdtor_test.py
@@ -31,9 +31,14 @@
'''Test cases for virtual destructor.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import VirtualDtor
class ExtendedVirtualDtor(VirtualDtor):
diff --git a/sources/shiboken2/tests/samplebinding/virtualmethods_test.py b/sources/shiboken2/tests/samplebinding/virtualmethods_test.py
index a52ce6bf5..2d3198071 100644
--- a/sources/shiboken2/tests/samplebinding/virtualmethods_test.py
+++ b/sources/shiboken2/tests/samplebinding/virtualmethods_test.py
@@ -31,9 +31,14 @@
'''Test cases for virtual methods.'''
+import os
import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
import warnings
diff --git a/sources/shiboken2/tests/samplebinding/visibilitychange_test.py b/sources/shiboken2/tests/samplebinding/visibilitychange_test.py
index a0ead1fb4..7f723221a 100644
--- a/sources/shiboken2/tests/samplebinding/visibilitychange_test.py
+++ b/sources/shiboken2/tests/samplebinding/visibilitychange_test.py
@@ -29,8 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import *
class VisibilityChangeTest(unittest.TestCase):
diff --git a/sources/shiboken2/tests/samplebinding/voidholder_test.py b/sources/shiboken2/tests/samplebinding/voidholder_test.py
index 361a3bcdd..07b83347b 100644
--- a/sources/shiboken2/tests/samplebinding/voidholder_test.py
+++ b/sources/shiboken2/tests/samplebinding/voidholder_test.py
@@ -31,8 +31,14 @@
'''Test case for a class that holds a void pointer.'''
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import VoidHolder, Point
import shiboken2 as shiboken
diff --git a/sources/shiboken2/tests/samplebinding/weakref_test.py b/sources/shiboken2/tests/samplebinding/weakref_test.py
index 5379169e1..a4a2dc461 100644
--- a/sources/shiboken2/tests/samplebinding/weakref_test.py
+++ b/sources/shiboken2/tests/samplebinding/weakref_test.py
@@ -31,8 +31,14 @@
'''Test weakref support'''
-import weakref
+import os
+import sys
import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
from sample import ObjectType, PrivateDtor
diff --git a/sources/shiboken2/tests/samplebinding/writableclassdict_test.py b/sources/shiboken2/tests/samplebinding/writableclassdict_test.py
index 003e35e7b..58083b5d4 100644
--- a/sources/shiboken2/tests/samplebinding/writableclassdict_test.py
+++ b/sources/shiboken2/tests/samplebinding/writableclassdict_test.py
@@ -29,7 +29,14 @@
##
#############################################################################
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from shiboken_paths import init_paths
+init_paths()
+
from sample import Point
class ExtPoint(Point): pass