Mercurial > lcfOS
changeset 190:65dda7e7e8bd
Disable test with qt
author | Windel Bouwman |
---|---|
date | Sat, 25 May 2013 15:15:42 +0200 |
parents | 5334b86ac1db |
children | 6b2bec5653f1 |
files | python/testhexedit.py python/thex.py |
diffstat | 2 files changed, 24 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/python/testhexedit.py Sat May 25 15:04:44 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -import unittest -import hexedit -from PyQt4.QtGui import QApplication -from PyQt4.QtTest import QTest -from PyQt4.QtCore import Qt -import sys - -class HexTest(unittest.TestCase): - def setUp(self): - self.app = QApplication(sys.argv) - self.ui = hexedit.HexEditor() - self.bv = self.ui.he.bv - # Provide some random data: - self.bv.Data = bytearray(range(10)) * 8 + b'x' - def testOpenButton(self): - QTest.mouseClick(self.bv, Qt.LeftButton) - self.assertEqual(self.bv.CursorPosition, 161) - QTest.keyClick(self.bv, Qt.Key_Left) - self.assertEqual(self.bv.CursorPosition, 160) - QTest.keyClick(self.bv, Qt.Key_Up) - self.assertEqual(self.bv.CursorPosition, 128) - -if __name__ == '__main__': - unittest.main()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/thex.py Sat May 25 15:15:42 2013 +0200 @@ -0,0 +1,24 @@ +import unittest +import hexedit +from PyQt4.QtGui import QApplication +from PyQt4.QtTest import QTest +from PyQt4.QtCore import Qt +import sys + +class HexTest(unittest.TestCase): + def setUp(self): + self.app = QApplication(sys.argv) + self.ui = hexedit.HexEditor() + self.bv = self.ui.he.bv + # Provide some random data: + self.bv.Data = bytearray(range(10)) * 8 + b'x' + def testOpenButton(self): + QTest.mouseClick(self.bv, Qt.LeftButton) + self.assertEqual(self.bv.CursorPosition, 161) + QTest.keyClick(self.bv, Qt.Key_Left) + self.assertEqual(self.bv.CursorPosition, 160) + QTest.keyClick(self.bv, Qt.Key_Up) + self.assertEqual(self.bv.CursorPosition, 128) + +if __name__ == '__main__': + unittest.main()