File: ScrolledField_test.py

package info (click to toggle)
python-pmw 2.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,968 kB
  • sloc: python: 42,737; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 684 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Tkinter
import Test
import Pmw

Test.initialise()

c = Pmw.ScrolledField

kw_1 = {'labelpos': 'nw'}
tests_1 = (
  (c.pack, (), {'padx' : 10, 'pady' : 10, 'fill' : 'both', 'expand' : 1}),
  (Test.num_options, (), 4),
  ('text', 'Hello World'),
  ('label_textvariable', Test.stringvar),
  ('label_textvariable', ''),
  ('label_text', 'Label'),
  ('label_font', Test.font['small']),
  ('label_image', Test.flagup),
  ('label_image', ''),
  ('entry_foreground', 'red'),
  ('text', 'Foo'),
  ('entry_font', Test.font['small']),
)

alltests = (
  (tests_1, kw_1),
)

testData = ((c, alltests),)

if __name__ == '__main__':
    Test.runTests(testData)