diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-05 08:14:27 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-05 12:38:01 +0100 |
commit | 88ab82b283fcb7e5805819ea18dc8d22b035b7bf (patch) | |
tree | e995cfa6e9f5351f75d7cb11f87e8b3a5db83d40 /testing/__init__.py | |
parent | 2a8675cdbcc3e064069b6f1878fe1c1ce736653c (diff) | |
parent | 939150289d13b40882f7247d05213a0418076810 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.9
Change-Id: I254cc725505349e73c7abc290afc7abb85156997
Diffstat (limited to 'testing/__init__.py')
-rw-r--r-- | testing/__init__.py | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/__init__.py b/testing/__init__.py new file mode 100644 index 000000000..a540251cc --- /dev/null +++ b/testing/__init__.py @@ -0,0 +1,61 @@ +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of PySide2. +## +## $QT_BEGIN_LICENSE:LGPL$ +## 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 Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 3 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL3 included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 3 requirements +## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 2.0 or (at your option) the GNU General +## Public license version 3 or any later version approved by the KDE Free +## Qt Foundation. The licenses are as published by the Free Software +## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +## 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-2.0.html and +## https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +from __future__ import print_function + +import sys +from . import command + +main = command.main + +# modify print so that it always flushes +__builtins__["orig_print"] = __builtins__["print"] + +def print_flushed(*args, **kw): + orig_print(*args, **kw) + sys.stdout.flush() + +__builtins__["print"] = print_flushed + +print = print_flushed + +# We also could use "python -u" to get unbuffered output. +# This method is better since it needs no change of the interface. + +# eof |