diff options
| author | Stephen Kelly <steveire@gmail.com> | 2017-01-15 11:36:08 +0000 | 
|---|---|---|
| committer | Stephen Kelly <steveire@gmail.com> | 2017-01-15 11:48:23 +0000 | 
| commit | 51410384458b941291f71400d49c3f6d6efbef49 (patch) | |
| tree | 8a5512364a2ac7c730e8d00714200221a97bdf7f /autotests/pythontest.py | |
| parent | eab822e206207c51d47f0f0da109caacfbee4e2f (diff) | |
| download | kconfig-51410384458b941291f71400d49c3f6d6efbef49.tar.gz kconfig-51410384458b941291f71400d49c3f6d6efbef49.tar.bz2 | |
Add python bindings
Diffstat (limited to 'autotests/pythontest.py')
| -rw-r--r-- | autotests/pythontest.py | 28 | 
1 files changed, 28 insertions, 0 deletions
| diff --git a/autotests/pythontest.py b/autotests/pythontest.py new file mode 100644 index 00000000..2a51ed44 --- /dev/null +++ b/autotests/pythontest.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +#-*- coding: utf-8 -*- + +from __future__ import print_function + +import sys + +sys.path.append(sys.argv[1]) + +from PyQt5 import QtCore +from PyQt5 import QtGui +from PyQt5 import QtWidgets + +from PyKF5 import KConfigCore +from PyKF5 import KConfigGui + +def main(): +    app = QtWidgets.QApplication(sys.argv) + +    kcg = KConfigCore.KConfigGroup(); + +    assert(not kcg.isValid()) + +    sc = KConfigGui.KStandardShortcut.open() +    assert(sc == [QtGui.QKeySequence("CTRL+O")]) + +if __name__ == '__main__': +    sys.exit(main()) | 
