aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/smartbinding/smart_pointer_test.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove traces of Python 2: tests and flake fixesCristián Maureira-Fredes2024-11-051-1/+1
| | | | | | | | | Addressing a few comments from tests that were related to the Python 2 compatibility. Pick-to: 6.8 Change-Id: I88c614549cfb91f879fe3e0d82a6988362e0ce19 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-201-0/+1
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* shiboken tests/smartbinding: Fix flake8 warningsFriedemann Kleint2024-03-121-1/+1
| | | | | | Pick-to: 6.6 6.5 Change-Id: Iecc01ad457053f5ce59512ea66cb0347f54334c7 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Enable specifying namespaces for smart pointer instantiationsFriedemann Kleint2022-11-101-0/+1
| | | | | | | | | [ChangeLog][shiboken6] It is now possible to specify a namespace for a smart pointer instantiation. Task-number: PYSIDE-454 Change-Id: I9b61c3514211108fd7009e1776ae4fb8988c576b Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Make it possible to specify names for smart pointer instantiationsFriedemann Kleint2022-11-091-0/+2
| | | | | | | | | [ChangeLog][shiboken6] It is now possible to specify names for smart pointer instantiations. Task-number: PYSIDE-454 Change-Id: Icbb3446c1e3a2fd1db456b20e96af618e1a678e8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-271-29/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Write smart pointer constructors/reset methodsFriedemann Kleint2022-04-201-1/+17
| | | | | | | | | | Enable the generation and invalidate the pointee passed in in case it is a wrapped class. Task-number: PYSIDE-454 Change-Id: I4c751d9e8731a6f70e4ecc0f808cb204f010f9b2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6/smart pointer test suite: Rename APIFriedemann Kleint2022-03-251-17/+17
| | | | | | Task-number: PYSIDE-454 Change-Id: Iac84695a35eb9e3e6512e3310536058b49ad79ac Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6/smart pointer test suite: Brush up the testFriedemann Kleint2022-03-251-23/+26
| | | | | | | | | Fix flake 8 warnings and move verbose setting to unittest.TestCase.setUp() with an environment variable. Task-number: PYSIDE-454 Change-Id: I6947467cf3b308d1a0eb6ccab59bbe0e25ca7acb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PyPySide: fix a bunch of pseudo-errorsChristian Tismer2022-03-111-0/+2
| | | | | | | | | | | | | These ten errors could be removed. There were more GC calls needed. Sometimes, calling GC twice did the trick. We are now at 14 core errors, 18 in total :) Task-number: PYSIDE-1843 Task-number: PYSIDE-535 Change-Id: Iafb3f93682639ba28e5326f3b8cdebf6670a7b69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix some tests checking delection for PyPyFriedemann Kleint2022-03-071-0/+14
| | | | | | | | | Add gc.collect(). Task-number: PYSIDE-535 Task-number: PYSIDE-1843 Change-Id: Ia52e53a42cb6fa266dfabcec607fb3391eb9d22a Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Handle None as a shared pointer parameterFriedemann Kleint2021-11-241-0/+8
| | | | | | | | | | Add checks for None to the copy converters. Pick-to: 6.2 Task-number: PYSIDE-454 Change-Id: I03954189e26572d248e22118954115bf8281b0f9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add a test for operator nb_bool of smart pointersFriedemann Kleint2021-11-241-0/+6
| | | | | | | Task-number: PYSIDE-454 Pick-to: 6.2 Change-Id: I849d0a855395846f7cbe9cd97685457627dfd1a2 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Generate rich comparison for smart pointersFriedemann Kleint2021-11-181-0/+34
| | | | | | | | | | | | | | Add the pointee class to the GeneratorContext for smart pointers and generate a comparison operator for the pointee. Use the pointee's comparison operators if there are any; else generate a simple equality check based on pointee address. [ChangeLog][shiboken6] Comparison operators for pointees of smart pointers are now generated. Fixes: PYSIDE-1711 Change-Id: Ib21b90a4ccfe635ea051831a5b66a79ded06b194 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PyPySide: fix quite a few tests using del or __del__Christian Tismer2021-10-271-1/+13
| | | | | | | | | | | | | | | | | In PyPy, the __del__ method is only triggered reliably by calling gc.collect() Also, the del statement does a deletion from the namespace, but the real deletion happens when gc.collent() is called. This was applied to all tests which use del, regardless if it has a visible effect on PyPy or not. It turned out to save more 8 errors, which is great. Task-number: PYSIDE-535 Change-Id: I6a58d90629c9eafec7307c17f021251113b3c7f2 Pick-to: 6.2 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Switch from os.path to pathlib.Path, systematic test changesChristian Tismer2021-02-081-1/+2
| | | | | | | | | | | | | | | | | | This patch does the systematic changes on all tests. Note that there was a bug in principle: os.path was used without importing os.path This worked through the way how the os module initializes itself, but you always will find the explicit import in the python library. But the problem is going away anyway after the transition to pathlib.Path :) Change-Id: I95144d7f9bb07a38376c3aa428df663f2e64bcb7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* python3: remove all obsolete "from __future__" import statementsChristian Tismer2020-11-091-2/+0
| | | | | | | | | | | Note that not all future statements can be removed: PEP 563 for instance deals with from __future__ import annotations Task-number: PYSIDE-904 Change-Id: Ia387ec87f3c68ca64d13e8e80191eda900f58638 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-281-0/+232
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>