From 6744b9dd4629637b417ba4a9fed1d56e8a70fe6f Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Mon, 8 Jan 2018 12:57:45 +0100 Subject: Add bindings for QColormap Removing depth and Mode from tests. assertEqual instead of assertTrue. Change-Id: I9f0f04a460790b65af264c58ab65f248ae207e81 Reviewed-by: Friedemann Kleint --- sources/pyside2/tests/QtWidgets/CMakeLists.txt | 1 + sources/pyside2/tests/QtWidgets/qcolormap_test.py | 43 +++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 sources/pyside2/tests/QtWidgets/qcolormap_test.py (limited to 'sources/pyside2/tests/QtWidgets') diff --git a/sources/pyside2/tests/QtWidgets/CMakeLists.txt b/sources/pyside2/tests/QtWidgets/CMakeLists.txt index 3c31b1d7d..60a1d7d6f 100644 --- a/sources/pyside2/tests/QtWidgets/CMakeLists.txt +++ b/sources/pyside2/tests/QtWidgets/CMakeLists.txt @@ -125,6 +125,7 @@ PYSIDE_TEST(qvalidator_test.py) PYSIDE_TEST(qvariant_test.py) PYSIDE_TEST(qwidget_setlayout_test.py) PYSIDE_TEST(qwidget_test.py) +PYSIDE_TEST(qcolormap_test.py) PYSIDE_TEST(reference_count_test.py) PYSIDE_TEST(returnquadruplesofnumbers_test.py) PYSIDE_TEST(standardpixmap_test.py) diff --git a/sources/pyside2/tests/QtWidgets/qcolormap_test.py b/sources/pyside2/tests/QtWidgets/qcolormap_test.py new file mode 100644 index 000000000..c71216592 --- /dev/null +++ b/sources/pyside2/tests/QtWidgets/qcolormap_test.py @@ -0,0 +1,43 @@ +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of PySide2. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +import unittest + +from PySide2.QtWidgets import QColormap +from helper import UsesQApplication + + +class QColormapTest(UsesQApplication): + + def testQColormap(self): + qc = QColormap.instance() + self.assertEqual(qc.size(), -1) + + +if __name__ == '__main__': + unittest.main() -- cgit v1.2.3