diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/README | 14 | ||||
| -rw-r--r-- | test/ScintillaCallable.py | 154 | ||||
| -rw-r--r-- | test/XiteQt.py | 63 | ||||
| -rw-r--r-- | test/XiteWin.py | 206 | ||||
| -rw-r--r-- | test/lexTests.py | 13 | ||||
| -rw-r--r-- | test/performanceTests.py | 11 | ||||
| -rw-r--r-- | test/simpleTests.py | 46 | 
7 files changed, 284 insertions, 223 deletions
| diff --git a/test/README b/test/README index 2985e7a4d..f62f17851 100644 --- a/test/README +++ b/test/README @@ -1,14 +1,14 @@  The test directory contains some unit and performance tests for Scintilla. -The tests can only be run on Windows using Python 2.7 or 3.x. Running on another platform -would require writing a file similar to XiteWin.py for that platform. Python 2.7+ is required  -because the bytes string type and literals are available. +The tests can only be run on Windows or Linux/Qt using Python 2.7 or 3.x. +Python 2.7+ is required because the bytes string type and literals are available. +Scintilla must be built before running any tests. -A test application is in xite.py and this can be run to experiment: +A test application for Windows only is in xite.py and this can be run to experiment:  pythonw xite.py  To run the basic tests: -pythonw simpleTests.py +python simpleTests.py  There are some lexing tests with simple input files in several languages in the examples   subdirectory and their expected lexed states in *.styled where the start of each style  @@ -16,10 +16,10 @@ is marked with {styleNumber}, for example:  {15}<%@{16}language=javas{15}%>{0}  To run the lexing tests: -pythonw lexTests.py +python lexTests.py  To check for performance regressions: -pythonw performanceTests.py +python performanceTests.py  While each test run will be different and the timer has only limited granularity, some results  from a 2 GHz Athlon with a DEBUG build are:   0.187 testAddLine diff --git a/test/ScintillaCallable.py b/test/ScintillaCallable.py new file mode 100644 index 000000000..4870e7388 --- /dev/null +++ b/test/ScintillaCallable.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- + +from __future__ import unicode_literals + +import ctypes, os, sys + +from ctypes import c_int, c_ulong, c_char_p, c_wchar_p, c_ushort, c_uint, c_long + +class TEXTRANGE(ctypes.Structure): +	_fields_= (\ +		('cpMin', c_long), +		('cpMax', c_long), +		('lpstrText', ctypes.POINTER(ctypes.c_char)), +	) + +class FINDTEXT(ctypes.Structure): +	_fields_= (\ +		('cpMin', c_long), +		('cpMax', c_long), +		('lpstrText', c_char_p), +		('cpMinText', c_long), +		('cpMaxText', c_long), +	) + +class SciCall: +	def __init__(self, fn, ptr, msg, stringResult=False): +		self._fn = fn +		self._ptr = ptr +		self._msg = msg +		self._stringResult = stringResult +	def __call__(self, w=0, l=0): +		ww = ctypes.cast(w, c_char_p) +		if self._stringResult: +			lengthBytes = self._fn(self._ptr, self._msg, ww, None) +			if lengthBytes == 0: +				return bytearray() +			result = (ctypes.c_byte * lengthBytes)(0) +			lengthBytes2 = self._fn(self._ptr, self._msg, ww, ctypes.cast(result, c_char_p)) +			assert lengthBytes == lengthBytes2 +			return bytearray(result)[:lengthBytes] +		else: +			ll = ctypes.cast(l, c_char_p) +			return self._fn(self._ptr, self._msg, ww, ll) + +sciFX = ctypes.CFUNCTYPE(c_long, c_char_p, c_int, c_char_p, c_char_p) + +class ScintillaCallable: +	def __init__(self, face, scifn, sciptr): +		self.__dict__["face"] = face +		self.__dict__["used"] = set() +		self.__dict__["all"] = set() +		# The k member is for accessing constants as a dictionary +		self.__dict__["k"] = {} +		for f in face.features: +			self.all.add(f) +			if face.features[f]["FeatureType"] == "val": +				self.k[f] = int(self.face.features[f]["Value"], 0) +			elif face.features[f]["FeatureType"] == "evt": +				self.k["SCN_"+f] = int(self.face.features[f]["Value"], 0) +		scifn = sciFX(scifn) +		self.__dict__["_scifn"] = scifn +		self.__dict__["_sciptr"] = sciptr +	def __getattr__(self, name): +		if name in self.face.features: +			self.used.add(name) +			feature = self.face.features[name] +			value = int(feature["Value"], 0) +			#~ print("Feature", name, feature) +			if feature["FeatureType"] == "val": +				self.__dict__[name] = value +				return value +			else: +				if feature["Param2Type"] == "stringresult" and \ +					name not in ["GetText", "GetLine", "GetCurLine"]: +					return SciCall(self._scifn, self._sciptr, value, True) +				else: +					return SciCall(self._scifn, self._sciptr, value) +		elif ("Get" + name) in self.face.features: +			self.used.add("Get" + name) +			feature = self.face.features["Get" + name] +			value = int(feature["Value"], 0) +			if feature["FeatureType"] == "get" and \ +				not name.startswith("Get") and \ +				not feature["Param1Type"] and \ +				not feature["Param2Type"] and \ +				feature["ReturnType"] in ["bool", "int", "position"]: +				#~ print("property", feature) +				return self._scifn(self._sciptr, value, None, None) +		elif name.startswith("SCN_") and name in self.k: +			self.used.add(name) +			feature = self.face.features[name[4:]] +			value = int(feature["Value"], 0) +			#~ print("Feature", name, feature) +			if feature["FeatureType"] == "val": +				return value +		raise AttributeError(name) +	def __setattr__(self, name, val): +		if ("Set" + name) in self.face.features: +			self.used.add("Set" + name) +			feature = self.face.features["Set" + name] +			value = int(feature["Value"], 0) +			#~ print("setproperty", feature) +			if feature["FeatureType"] == "set" and not name.startswith("Set"): +				if feature["Param1Type"] in ["bool", "int", "position"]: +					return self._scifn(self._sciptr, value, c_char_p(val), None) +				elif feature["Param2Type"] in ["string"]: +					return self._scifn(self._sciptr, value, None, c_char_p(val)) +				raise AttributeError(name) +		raise AttributeError(name) +	def getvalue(self, name): +		if name in self.face.features: +			feature = self.face.features[name] +			if feature["FeatureType"] != "evt": +				try: +					return int(feature["Value"], 0) +				except ValueError: +					return -1 +		return -1 + + +	def ByteRange(self, start, end): +		tr = TEXTRANGE() +		tr.cpMin = start +		tr.cpMax = end +		length = end - start +		tr.lpstrText = ctypes.create_string_buffer(length + 1) +		self.GetTextRange(0, ctypes.byref(tr)) +		text = tr.lpstrText[:length] +		text += b"\0" * (length - len(text)) +		return text +	def StyledTextRange(self, start, end): +		tr = TEXTRANGE() +		tr.cpMin = start +		tr.cpMax = end +		length = 2 * (end - start) +		tr.lpstrText = ctypes.create_string_buffer(length + 2) +		self.GetStyledText(0, ctypes.byref(tr)) +		styledText = tr.lpstrText[:length] +		styledText += b"\0" * (length - len(styledText)) +		return styledText +	def FindBytes(self, start, end, s, flags): +		ft = FINDTEXT() +		ft.cpMin = start +		ft.cpMax = end +		ft.lpstrText = s +		ft.cpMinText = 0 +		ft.cpMaxText = 0 +		pos = self.FindText(flags, ctypes.byref(ft)) +		#~ print(start, end, ft.cpMinText, ft.cpMaxText) +		return pos + +	def Contents(self): +		return self.ByteRange(0, self.Length) + diff --git a/test/XiteQt.py b/test/XiteQt.py new file mode 100644 index 000000000..0230cc77c --- /dev/null +++ b/test/XiteQt.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- + +import ctypes, os, sys, unittest + +from PySide.QtCore import * +from PySide.QtGui import * + +import ScintillaCallable + +sys.path.append("..") +from bin import ScintillaEditPy + +scintillaDirectory = ".." +scintillaIncludeDirectory = os.path.join(scintillaDirectory, "include") +sys.path.append(scintillaIncludeDirectory) +import Face + +class Form(QDialog): + +	def __init__(self, parent=None): +		super(Form, self).__init__(parent) +		self.resize(460,300) +		# Create widget +		self.edit = ScintillaEditPy.ScintillaEdit(self) + +class XiteWin(): +	def __init__(self, test=""): +		self.face = Face.Face() +		self.face.ReadFromFile(os.path.join(scintillaIncludeDirectory, "Scintilla.iface")) + +		self.test = test + +		self.form = Form() + +		scifn = self.form.edit.send(int(self.face.features["GetDirectFunction"]["Value"]), 0, 0) +		sciptr = ctypes.c_char_p(self.form.edit.send( +			int(self.face.features["GetDirectPointer"]["Value"]), 0,0)) + +		self.ed = ScintillaCallable.ScintillaCallable(self.face, scifn, sciptr) +		self.form.show() +		 +	def DoStuff(self): +		print(self.test) +		self.CmdTest() + +	def DoEvents(self): +		QApplication.processEvents() + +	def CmdTest(self): +		runner = unittest.TextTestRunner() +		tests = unittest.defaultTestLoader.loadTestsFromName(self.test) +		results = runner.run(tests) +		print(results) +		sys.exit(0) + +xiteFrame = None + +def main(test): +	global xiteFrame +	app = QApplication(sys.argv) +	xiteFrame = XiteWin(test) +	xiteFrame.DoStuff() +	sys.exit(app.exec_()) diff --git a/test/XiteWin.py b/test/XiteWin.py index 903743d0a..78b023dbf 100644 --- a/test/XiteWin.py +++ b/test/XiteWin.py @@ -14,6 +14,7 @@ gdi32=ctypes.windll.gdi32  kernel32=ctypes.windll.kernel32  from MessageNumbers import msgs, sgsm +import ScintillaCallable  import XiteMenu  scintillaDirectory = ".." @@ -119,29 +120,6 @@ class WNDCLASS(ctypes.Structure):  		('lpzClassName', LPCWSTR),  	) -class XTEXTRANGE(ctypes.Structure): -	_fields_= (\ -		('cpMin', c_long), -		('cpMax', c_long), -		('lpstrText', c_char_p), -	) - -class TEXTRANGE(ctypes.Structure): -	_fields_= (\ -		('cpMin', c_long), -		('cpMax', c_long), -		('lpstrText', ctypes.POINTER(ctypes.c_char)), -	) - -class FINDTEXT(ctypes.Structure): -	_fields_= (\ -		('cpMin', c_long), -		('cpMax', c_long), -		('lpstrText', c_char_p), -		('cpMinText', c_long), -		('cpMaxText', c_long), -	) -  hinst = ctypes.windll.kernel32.GetModuleHandleW(0)  def RegisterClass(name, func, background = 0): @@ -159,158 +137,6 @@ def RegisterClass(name, func, background = 0):  	wc.lpzClassName = name  	user32.RegisterClassW(ctypes.byref(wc)) -class SciCall: -	def __init__(self, fn, ptr, msg, stringResult=False): -		self._fn = fn -		self._ptr = ptr -		self._msg = msg -		self._stringResult = stringResult -	def __call__(self, w=0, l=0): -		if type(w) == type("x"): -			ww = c_wchar_p(w) -		elif type(w) == type(b"x"): -			ww = c_char_p(w) -		elif w is None: -			ww = WPARAM() -		else: -			ww = WPARAM(w) -		if self._stringResult: -			lengthBytes = self._fn(self._ptr, self._msg, ww, None) -			if lengthBytes == 0: -				return bytearray() -			result = (ctypes.c_byte * lengthBytes)(0) -			lengthBytes2 = self._fn(self._ptr, self._msg, ww, result) -			assert lengthBytes == lengthBytes2 -			return bytearray(result)[:lengthBytes] -		else: -			if type(l) == type("x"): -				ll = c_wchar_p(l) -			elif type(l) == type(b"x"): -				ll = c_char_p(l) -			elif type(l) == type(1): -				ll = LPARAM(l) -			else: -				ll = l -			return self._fn(self._ptr, self._msg, ww, ll) - -class Scintilla: -	def __init__(self, face, hwndParent, hinstance): -		self.__dict__["face"] = face -		self.__dict__["used"] = set() -		self.__dict__["all"] = set() -		# The k member is for accessing constants as a dictionary -		self.__dict__["k"] = {} -		for f in face.features: -			self.all.add(f) -			if face.features[f]["FeatureType"] == "val": -				self.k[f] = int(self.face.features[f]["Value"], 0) -			elif face.features[f]["FeatureType"] == "evt": -				self.k["SCN_"+f] = int(self.face.features[f]["Value"], 0) -		# Get the function first as that also loads the DLL -		self.__dict__["_scifn"] = ctypes.windll.SciLexer.Scintilla_DirectFunction -		self.__dict__["_hwnd"] = user32.CreateWindowExW(0, -			"Scintilla", "Source", -			WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_CLIPCHILDREN, -			0, 0, 100, 100, hwndParent, 0, hinstance, 0) -		sciptr = c_char_p(user32.SendMessageW(self._hwnd, -			int(self.face.features["GetDirectPointer"]["Value"], 0), 0,0)) -		self.__dict__["_sciptr"] = sciptr -		user32.ShowWindow(self._hwnd, SW_SHOW) -	def __getattr__(self, name): -		if name in self.face.features: -			self.used.add(name) -			feature = self.face.features[name] -			value = int(feature["Value"], 0) -			#~ print("Feature", name, feature) -			if feature["FeatureType"] == "val": -				self.__dict__[name] = value -				return value -			else: -				if feature["Param2Type"] == "stringresult" and \ -					name not in ["GetText", "GetLine", "GetCurLine"]: -					return SciCall(self._scifn, self._sciptr, value, True) -				else: -					return SciCall(self._scifn, self._sciptr, value) -		elif ("Get" + name) in self.face.features: -			self.used.add("Get" + name) -			feature = self.face.features["Get" + name] -			value = int(feature["Value"], 0) -			if feature["FeatureType"] == "get" and \ -				not name.startswith("Get") and \ -				not feature["Param1Type"] and \ -				not feature["Param2Type"] and \ -				feature["ReturnType"] in ["bool", "int", "position"]: -				#~ print("property", feature) -				return self._scifn(self._sciptr, value, 0, 0) -		elif name.startswith("SCN_") and name in self.k: -			self.used.add(name) -			feature = self.face.features[name[4:]] -			value = int(feature["Value"], 0) -			#~ print("Feature", name, feature) -			if feature["FeatureType"] == "val": -				return value -		raise AttributeError(name) -	def __setattr__(self, name, val): -		if ("Set" + name) in self.face.features: -			self.used.add("Set" + name) -			feature = self.face.features["Set" + name] -			value = int(feature["Value"], 0) -			#~ print("setproperty", feature) -			if feature["FeatureType"] == "set" and not name.startswith("Set"): -				if feature["Param1Type"] in ["bool", "int", "position"]: -					return self._scifn(self._sciptr, value, val, 0) -				elif feature["Param2Type"] in ["string"]: -					return self._scifn(self._sciptr, value, 0, val) -				raise AttributeError(name) -		raise AttributeError(name) -	def getvalue(self, name): -		if name in self.face.features: -			feature = self.face.features[name] -			if feature["FeatureType"] != "evt": -				try: -					return int(feature["Value"], 0) -				except ValueError: -					return -1 -		return -1 - - -	def ByteRange(self, start, end): -		tr = TEXTRANGE() -		tr.cpMin = start -		tr.cpMax = end -		length = end - start -		tr.lpstrText = ctypes.create_string_buffer(length + 1) -		self.GetTextRange(0, ctypes.byref(tr)) -		text = tr.lpstrText[:length] -		text += b"\0" * (length - len(text)) -		return text -	def StyledTextRange(self, start, end): -		tr = TEXTRANGE() -		tr.cpMin = start -		tr.cpMax = end -		length = 2 * (end - start) -		tr.lpstrText = ctypes.create_string_buffer(length + 2) -		self.GetStyledText(0, ctypes.byref(tr)) -		styledText = tr.lpstrText[:length] -		styledText += b"\0" * (length - len(styledText)) -		return styledText -	def FindBytes(self, start, end, s, flags): -		ft = FINDTEXT() -		ft.cpMin = start -		ft.cpMax = end -		ft.lpstrText = s -		ft.cpMinText = 0 -		ft.cpMaxText = 0 -		pos = self.FindText(flags, ctypes.byref(ft)) -		#~ print(start, end, ft.cpMinText, ft.cpMaxText) -		return pos - -	def Contents(self): -		return self.ByteRange(0, self.Length) -	def SizeTo(self, width, height): -		user32.SetWindowPos(self._hwnd, 0, 0, 0, width, height, 0) -	def FocusOn(self): -		user32.SetFocus(self._hwnd)  class XiteWin():  	def __init__(self, test=""): @@ -335,7 +161,7 @@ class XiteWin():  		self.SetMenus()  		if args:  			self.GrabFile(args[0]) -			self.ed.FocusOn() +			self.FocusOnEditor()  			self.ed.GotoPos(self.ed.Length)  		if self.test: @@ -344,15 +170,31 @@ class XiteWin():  				if self.cmds[k] == "Test":  					user32.PostMessageW(self.win, msgs["WM_COMMAND"], k, 0) +	def FocusOnEditor(self): +		user32.SetFocus(self.sciHwnd) +  	def OnSize(self):  		width, height = WindowSize(self.win) -		self.ed.SizeTo(width, height) +		user32.SetWindowPos(self.sciHwnd, 0, 0, 0, width, height, 0)  		user32.InvalidateRect(self.win, 0, 0)  	def OnCreate(self, hwnd):  		self.win = hwnd -		self.ed = Scintilla(self.face, hwnd, hinst) -		self.ed.FocusOn() +		# Side effect: loads the DLL +		x = ctypes.windll.SciLexer.Scintilla_DirectFunction +		self.sciHwnd = user32.CreateWindowExW(0, +			"Scintilla", "Source", +			WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_CLIPCHILDREN, +			0, 0, 100, 100, self.win, 0, hinst, 0) +		user32.ShowWindow(self.sciHwnd, SW_SHOW) +		user32.SendMessageW.restype = WPARAM +		scifn = user32.SendMessageW(self.sciHwnd, +			int(self.face.features["GetDirectFunction"]["Value"], 0), 0,0) +		sciptr = c_char_p(user32.SendMessageW(self.sciHwnd, +			int(self.face.features["GetDirectPointer"]["Value"], 0), 0,0)) +		self.ed = ScintillaCallable.ScintillaCallable(self.face, scifn, sciptr) + +		self.FocusOnEditor()  	def Invalidate(self): @@ -380,7 +222,7 @@ class XiteWin():  			return 0  		elif ms == "WM_ACTIVATE":  			if w != WA_INACTIVE: -				self.ed.FocusOn() +				self.FocusOnEditor()  			return 0  		else:  			return user32.DefWindowProcW(h, m, w, l) @@ -464,7 +306,7 @@ class XiteWin():  		if ctypes.windll.comdlg32.GetOpenFileNameW(ctypes.byref(ofx)):  			absPath = opath.replace("\0", "")  			self.GrabFile(absPath) -			self.ed.FocusOn() +			self.FocusOnEditor()  			self.ed.LexerLanguage = "python"  			self.ed.Lexer = self.ed.SCLEX_PYTHON  			self.ed.SetKeyWords(0, b"class def else for from if import print return while") @@ -494,7 +336,7 @@ class XiteWin():  			self.fullPath = opath.replace("\0", "")  			self.Save()  			self.SetTitle(1) -			self.ed.FocusOn() +			self.FocusOnEditor()  	def SetMenus(self):  		ui = XiteMenu.MenuStructure diff --git a/test/lexTests.py b/test/lexTests.py index 5c14bafc6..4d5cde4ff 100644 --- a/test/lexTests.py +++ b/test/lexTests.py @@ -2,11 +2,12 @@  from __future__ import with_statement -import io -import os -import unittest +import io, os, sys, unittest -import XiteWin +if sys.platform == "win32": +	import XiteWin as Xite +else: +	import XiteQt as Xite  keywordsHTML = [  b"b body content head href html link meta " @@ -18,7 +19,7 @@ b"sub"  class TestLexers(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -123,4 +124,4 @@ class TestLexers(unittest.TestCase):  			b"keyword6", b"keyword7"])  if __name__ == '__main__': -	XiteWin.main("lexTests") +	Xite.main("lexTests") diff --git a/test/performanceTests.py b/test/performanceTests.py index da9c87759..5cfd6e25c 100644 --- a/test/performanceTests.py +++ b/test/performanceTests.py @@ -3,14 +3,17 @@  from __future__ import with_statement  from __future__ import unicode_literals -import os, string, time, unittest +import os, string, sys, time, unittest -import XiteWin +if sys.platform == "win32": +	import XiteWin as Xite +else: +	import XiteQt as Xite  class TestPerformance(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -81,4 +84,4 @@ class TestPerformance(unittest.TestCase):  		self.assert_(self.ed.Length > 0)  if __name__ == '__main__': -	XiteWin.main("performanceTests") +	Xite.main("performanceTests") diff --git a/test/simpleTests.py b/test/simpleTests.py index 5d2506788..a101857f8 100644 --- a/test/simpleTests.py +++ b/test/simpleTests.py @@ -5,12 +5,15 @@ from __future__ import unicode_literals  import codecs, ctypes, os, sys, unittest -import XiteWin +if sys.platform == "win32": +	import XiteWin as Xite +else: +	import XiteQt as Xite  class TestSimple(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -618,7 +621,7 @@ REDO = 4  class TestContainerUndo(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -773,7 +776,7 @@ class TestKeyCommands(unittest.TestCase):  	""" These commands are normally assigned to keys and take no arguments """  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -854,7 +857,7 @@ class TestKeyCommands(unittest.TestCase):  class TestMarkers(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -939,7 +942,7 @@ class TestMarkers(unittest.TestCase):  class TestIndicators(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -988,7 +991,7 @@ class TestIndicators(unittest.TestCase):  class TestScrolling(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1019,7 +1022,7 @@ class TestScrolling(unittest.TestCase):  class TestSearch(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1102,7 +1105,7 @@ class TestSearch(unittest.TestCase):  class TestProperties(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1119,7 +1122,7 @@ class TestProperties(unittest.TestCase):  class TestTextMargin(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1166,7 +1169,7 @@ class TestTextMargin(unittest.TestCase):  class TestAnnotation(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1221,7 +1224,7 @@ class TestAnnotation(unittest.TestCase):  class TestMultiSelection(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1347,7 +1350,7 @@ class TestMultiSelection(unittest.TestCase):  class TestCaseMapping(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1412,7 +1415,7 @@ class TestCaseMapping(unittest.TestCase):  class TestCaseInsensitiveSearch(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1497,7 +1500,7 @@ class TestCaseInsensitiveSearch(unittest.TestCase):  class TestLexer(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1529,7 +1532,7 @@ class TestLexer(unittest.TestCase):  class TestAutoComplete(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1614,7 +1617,7 @@ class TestAutoComplete(unittest.TestCase):  class TestDirectAccess(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1644,7 +1647,7 @@ class TestDirectAccess(unittest.TestCase):  class TestWordChars(unittest.TestCase):  	def setUp(self): -		self.xite = XiteWin.xiteFrame +		self.xite = Xite.xiteFrame  		self.ed = self.xite.ed  		self.ed.ClearAll()  		self.ed.EmptyUndoBuffer() @@ -1742,13 +1745,8 @@ class TestWordChars(unittest.TestCase):  		data = self.ed.GetPunctuationChars(None)  		self.assertCharSetsEqual(data, expected) -#~ import os -#~ for x in os.getenv("PATH").split(";"): -	#~ n = "scilexer.dll" -	#~ nf = x + "\\" + n -	#~ print os.access(nf, os.R_OK), nf  if __name__ == '__main__': -	uu = XiteWin.main("simpleTests") +	uu = Xite.main("simpleTests")  	#~ for x in sorted(uu.keys()):  		#~ print(x, uu[x])  	#~ print() | 
