Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 19 lines (12 sloc) 0.523 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
19932df Billy Earney modified uitest example so that test case uses the UnitTest module in ui...
earney authored
8 class LabelTest(UnitTest1):
be16872 add uitest
lkcl authored
9
10 def testLabelAdd(self):
11 self.l = Label("Hello World (label)", StyleName='teststyle')
c66b15d use a div to put tests in
lkcl authored
12 RootPanel('tests').add(self.l)
13 self.write_test_output('addlabel')
be16872 add uitest
lkcl authored
14
c66b15d use a div to put tests in
lkcl authored
15 if not RootPanel('tests').remove(self.l):
be16872 add uitest
lkcl authored
16 self.fail("Label added but apparently not owned by RootPanel()")
c66b15d use a div to put tests in
lkcl authored
17 self.write_test_output('removelabel')
be16872 add uitest
lkcl authored
18
Something went wrong with that request. Please try again.