From 590abafc54206e458066f5632accda94e37f5edf Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Fri, 10 Jun 2011 18:35:31 -0300 Subject: Fix bug 822 - "Can't use QApplication without X" Reviewer: Marcelo Lira Luciano Wolf --- tests/QtGui/CMakeLists.txt | 1 + tests/QtGui/bug_882.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/QtGui/bug_882.py (limited to 'tests') diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 9afe3175c..5209ee581 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -64,6 +64,7 @@ PYSIDE_TEST(bug_854.py) PYSIDE_TEST(bug_860.py) PYSIDE_TEST(bug_862.py) PYSIDE_TEST(bug_871.py) +PYSIDE_TEST(bug_882.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(deepcopy_test.py) PYSIDE_TEST(event_filter_test.py) diff --git a/tests/QtGui/bug_882.py b/tests/QtGui/bug_882.py new file mode 100644 index 000000000..88f769cbe --- /dev/null +++ b/tests/QtGui/bug_882.py @@ -0,0 +1,13 @@ +from PySide.QtGui import * +from PySide.QtCore import * +import os + +if "DISPLAY" in os.environ: + del os.environ["DISPLAY"] + +app = QApplication([], False) +QTimer.singleShot(0, app.quit) +app.exec_() + + + -- cgit v1.2.3