Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 20 lines (13 sloc) 0.544 kb
be16872 add uitest
lkcl authored
1 from pyjamas.ui.RootPanel import RootPanel
2 from pyjamas.ui.Label import Label
3
19932df Billy Earney modified uitest example so that test case uses the UnitTest module in ui...
earney authored
4 from UnitTest import UnitTest1
be16872 add uitest
lkcl authored
5
6 from __pyjamas__ import doc
7
3fcc29d Billy Earney added TODO (see issue 768) to all the example files in uitest
earney authored
8 #TODO: see issue 768
19932df Billy Earney modified uitest example so that test case uses the UnitTest module in ui...
earney authored
9 class LabelTest(UnitTest1):
be16872 add uitest
lkcl authored
10
11 def testLabelAdd(self):
12 self.l = Label("Hello World (label)", StyleName='teststyle')
c66b15d use a div to put tests in
lkcl authored
13 RootPanel('tests').add(self.l)
14 self.write_test_output('addlabel')
be16872 add uitest
lkcl authored
15
c66b15d use a div to put tests in
lkcl authored
16 if not RootPanel('tests').remove(self.l):
be16872 add uitest
lkcl authored
17 self.fail("Label added but apparently not owned by RootPanel()")
c66b15d use a div to put tests in
lkcl authored
18 self.write_test_output('removelabel')
be16872 add uitest
lkcl authored
19
Something went wrong with that request. Please try again.