diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-03-15 15:34:33 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:03 -0300 |
commit | 734e08632729128135844b5c98817b4881a00a68 (patch) | |
tree | 286d30500678c1809c2c80d3156081717c7236c1 | |
parent | 855ad2d587161e8ae3ea7b0c64d30f73130e3cd8 (diff) |
Created unit test for bug #696.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_696.py | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 5a6931d95..68be0de80 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -41,6 +41,7 @@ PYSIDE_TEST(bug_667.py) PYSIDE_TEST(bug_668.py) PYSIDE_TEST(bug_674.py) PYSIDE_TEST(bug_675.py) +PYSIDE_TEST(bug_696.py) PYSIDE_TEST(bug_714.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(deepcopy_test.py) diff --git a/tests/QtGui/bug_696.py b/tests/QtGui/bug_696.py new file mode 100644 index 000000000..b165d042c --- /dev/null +++ b/tests/QtGui/bug_696.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# This file is part of the Shiboken Python Bindings Generator project. +# +# Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +# +# Contact: PySide team <contact@pyside.org> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License +# version 2.1 as published by the Free Software Foundation. Please +# review the following information to ensure the GNU Lesser General +# Public License version 2.1 requirements will be met: +# http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +# # +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301 USA + +import sys +import unittest + +from helper import UsesQApplication +from PySide.QtGui import QMainWindow, QMenu, QApplication + +class MainWindow(QMainWindow): + def __init__(self, *args): + self._menu = QMenu(self.dontexist) # attribute called with invalid C++ object + +class Bug696(UsesQApplication): + def testContructorInitialization(self): + self.assertRaises(RuntimeError, MainWindow) + +if __name__ == '__main__': + unittest.main() + |