aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/registry/existence_test.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2018-07-14 15:10:56 +0200
committerChristian Tismer <tismer@stackless.com>2018-12-22 12:26:10 +0000
commit73a9168ad56559bb3fba0d93866b05a7fde812de (patch)
treeb57018ee6702eac794867635d549a3b65509ca71 /sources/pyside2/tests/registry/existence_test.py
parentc013faebdfb248e1ce66fa41aa0a771aaf4e3d80 (diff)
Complete The Signature Introspection
The signature module has been quite far developed. In the course of making things fit for the TypeErrors with the signature module, now also all signatures from all shiboken modules are queried. Instead of writing an extra signature existence test for shiboken, it made more sense to extend the existing init_platform.py by the shiboken modules. In fact, by this query a corner case was exploited that worked on Python 2 but assertion-crashed on Python 3. The mapping.py modules were also completed to support all new PySide2 modules. Special care had to be taken because the "shiboken2" module exists both as directory and as binary module. The fix was tricky, and I will add a task that replaces such workarounds by a better design. Task-number: PYSIDE-510 Change-Id: Ibf8e322d1905976a0044a702ea178b7f98629fb4 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/tests/registry/existence_test.py')
-rw-r--r--sources/pyside2/tests/registry/existence_test.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/sources/pyside2/tests/registry/existence_test.py b/sources/pyside2/tests/registry/existence_test.py
index 0d8014ad8..762a5888e 100644
--- a/sources/pyside2/tests/registry/existence_test.py
+++ b/sources/pyside2/tests/registry/existence_test.py
@@ -39,17 +39,23 @@
from __future__ import print_function, absolute_import
+"""
+existence_test.py
+
+A test that checks all function signatures if they still exist.
+"""
+
import os
import sys
import unittest
from textwrap import dedent
from init_platform import (enum_all, generate_all, is_ci,
- getEffectiveRefPath, getRefPath, qtVersion)
+ get_effective_refpath, get_refpath, qt_version)
from util import isolate_warnings, check_warnings, suppress_warnings, warn
from PySide2 import *
-refPath = getRefPath()
-effectiveRefPath = getEffectiveRefPath()
+refPath = get_refpath()
+effectiveRefPath = get_effective_refpath()
effectiveRefPathRoot = os.path.splitext(effectiveRefPath)[0]
pyc = effectiveRefPathRoot + ".pyc"
if os.path.exists(pyc) and not os.path.exists(effectiveRefPath):
@@ -132,7 +138,7 @@ class TestSignaturesExists(unittest.TestCase):
tested_versions = (5, 6), (5, 9), (5, 11) #, (5, 12) # activate this, soon!
-if not have_refmodule and is_ci and qtVersion()[:2] in tested_versions:
+if not have_refmodule and is_ci and qt_version()[:2] in tested_versions:
class TestFor_CI_Init(unittest.TestCase):
"""
This helper class generates the reference file for CI.