Various minor cosmetic changes

This commit is contained in:
markm 2006-03-18 20:12:17 +00:00
parent 8ab71615be
commit aa6a9c1f7a
6 changed files with 21 additions and 27 deletions

@ -620,6 +620,7 @@ class WindowSpecification(object):
should be refered to as "Edit2".
"""
print "Control Identifiers:"
ctrls = _resolve_control(
self.criteria,
window_find_timeout,
@ -635,7 +636,7 @@ class WindowSpecification(object):
# filter out hidden controls
ctrls_to_print = [ctrl for ctrl in ctrls_to_print if ctrl.IsVisible()]
for ctrl in ctrls_to_print:
print "%s - %s %s"% (
print "%s - '%s' %s"% (
ctrl.Class(), ctrl.WindowText(), str(ctrl.Rectangle()))
print "\t",

@ -88,16 +88,11 @@ def GetData(format = win32defines.CF_UNICODETEXT):
return data
#====================================================================
def _unittests():
"do some basic tests"
formats = GetClipboardFormats()
print formats
# Todo: Implement setting clipboard data
#def SetData(data, formats = [win32defines.CF_UNICODETEXT, ]):
# pass
print [GetFormatName(format) for format in formats]
print repr(GetData())
#====================================================================
if __name__ == "__main__":

@ -25,6 +25,8 @@ __revision__ = "$Revision$"
import re
import difflib
import fuzzydict
# need to use sets.Set for python 2.3 compatability
import sets

@ -235,20 +235,3 @@ def enum_child_windows(handle):
return child_windows
#=========================================================================
def _unittests():
"Do a quick test of finding some windows"
windows = find_windows(
class_name_re = "#32770",
enabled_only = False,
visible_only = False)
for win in windows:
print "==" * 20
print handleprops.dumpwindow(win)
if __name__ == "__main__":
_unittests()

@ -710,7 +710,7 @@ class ToolbarTestCases(unittest.TestCase):
def testPressButton(self):
self.ctrl.PressButton(0)
print self.ctrl.Texts()
#print self.ctrl.Texts()
self.ctrl.PressButton("10")
raise "not fully tested"

@ -26,6 +26,19 @@ import unittest
from pywinauto.findwindows import *
#=========================================================================
def _unittests():
"Do a quick test of finding some windows"
windows = find_windows(
class_name_re = "#32770",
enabled_only = False,
visible_only = False)
for win in windows:
print "==" * 20
print handleprops.dumpwindow(win)
#class ApplicationTestCases(unittest.TestCase):
# "Unit tests for the ListViewWrapper class"
#