Skip to content
Browse files

modified uitest example so that test case uses the UnitTest module in…

… uitest directory, and modified write to define write_web, since another write_web is defined somewhere else and pyjs is getting confused.
  • Loading branch information...
1 parent f310f1a commit 19932df40596a37db85f58017ae6e7f60a882587 @earney earney committed Jul 7, 2012
View
4 examples/uitest/DOMTest.py
@@ -1,11 +1,11 @@
from pyjamas.ui.RootPanel import RootPanel
from pyjamas import DOM
-from UnitTest import UnitTest
+from UnitTest import UnitTest1
from __pyjamas__ import doc
-class DOMTest(UnitTest):
+class DOMTest(UnitTest1):
def testDivHTML(self):
e = DOM.getElementById('tests')
View
4 examples/uitest/DockPanelTest.py
@@ -2,11 +2,11 @@
from pyjamas.ui.DockPanel import DockPanel
from pyjamas.ui.Label import Label
-from UnitTest import UnitTest
+from UnitTest import UnitTest1
from __pyjamas__ import doc
-class DockPanelTest(UnitTest):
+class DockPanelTest(UnitTest1):
def testDockAdd(self):
self.d = DockPanel()
View
4 examples/uitest/EventTest.py
@@ -1,11 +1,11 @@
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.Button import Button
-from UnitTest import UnitTest
+from UnitTest import UnitTest1
from pyjamas import DOM
-class EventTest(UnitTest):
+class EventTest(UnitTest1):
def onClick(self, sender):
self.assertTrue(sender == self.b)
View
4 examples/uitest/LabelTest.py
@@ -1,11 +1,11 @@
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.Label import Label
-from UnitTest import UnitTest
+from UnitTest import UnitTest1
from __pyjamas__ import doc
-class LabelTest(UnitTest):
+class LabelTest(UnitTest1):
def testLabelAdd(self):
self.l = Label("Hello World (label)", StyleName='teststyle')
View
2 examples/uitest/UnitTest.py
@@ -76,7 +76,7 @@ def onError(self, responseText, status):
status %s, response %s""" % (self.test_name, str(status), repr(responseText)))
self.unittest.tests_outstanding -= 1
-class UnitTest:
+class UnitTest1:
def __init__(self, test_gen_folder):
self.test_gen_folder = test_gen_folder
View
3 examples/uitest/uitest.py
@@ -4,7 +4,7 @@
from __pyjamas__ import doc
-from UnitTest import IN_BROWSER, IN_JS, IN_BROWSER
+from UnitTest import IN_BROWSER, IN_JS
from DockPanelTest import DockPanelTest
from LabelTest import LabelTest
@@ -69,4 +69,3 @@ def main(test_gen_out):
test_gen_output_folder = sys.argv[1]
main(test_gen_output_folder )
-
View
1 examples/uitest/write.py
@@ -28,3 +28,4 @@ def write(text, do_escape=True):
def writebr(text, do_escape=True):
write(text + "<br />\n", do_escape)
+write_web=writebr

0 comments on commit 19932df

Please sign in to comment.
Something went wrong with that request. Please try again.