# Based on iwidgets2.2.0/tests/entryfield.test code.
'hello' : (lambda s
: s
== 'hello', len),
kw_1
= {'entry_width' : 12, 'labelpos' : 'n', 'label_text' : 'Entry Field:'}
(c
.pack
, (), {'padx' : 10, 'pady' : 10, 'fill' : 'both', 'expand' : 1}),
(Test
.num_options
, (), 10),
('errorbackground', 'red'),
('hull_background', 'yellow'),
('label_background', 'yellow'),
('entry_background', 'yellow'),
('hull_show', 'X', 'TclError: unknown option "-show"'),
('entry_borderwidth', 4),
('entry_borderwidth', 2),
('command', Test
.callback
),
('hull_cursor', 'gumby'),
('entry_exportselection', 0),
('label_foreground', 'Green'),
('entry_foreground', 'Green'),
('label_foreground', 'Black'),
('entry_foreground', 'Black'),
('label_highlightcolor', 'Red'),
('entry_highlightcolor', 'Red'),
('entry_highlightthickness', 2),
('entry_insertbackground', 'Yellow'),
('entry_insertbackground', 'Black'),
('entry_insertborderwidth', 1),
('entry_insertborderwidth', 0),
('entry_insertofftime', 400),
('entry_insertontime', 700),
('entry_insertwidth', 3),
('invalidcommand', Test
.callback
),
('entry_justify', 'right'),
('entry_justify', 'center'),
('entry_justify', 'left'),
('entry_relief', 'raised'),
('entry_relief', 'sunken'),
('entry_state', 'disabled'),
('entry_state', 'normal'),
('entry_background', 'GhostWhite'),
('validate', 'alphabetic'),
"ValueError: bad validate value \"bogus\": must be a function or one " +
"of the standard validators ('alphabetic', 'alphanumeric', 'date', " +
"'hexadecimal', 'integer', 'numeric', 'real', 'time') or extra " +
('relief', 'bogus', 'KeyError: Unknown option "relief" for EntryField'),
(c
.interior
, (), Tkinter
.Frame
),
(c
.insert
, ('end', 'Test String')),
(c
.get
, (), 'Test String'),
(c
.insert
, ('end', 'Another Test')),
(c
.insert
, ('end', '100')),
('validate', {'validator' : 'real', 'min' : 10}),
(c
.setentry
, 'hello', 0),
('extravalidators', _myValidators
),
(c
.setentry
, 'hello', 1),
(c
.cget
, 'entry_background', 'GhostWhite'),
('entry_textvariable', Test
.stringvar
),
(c
.cget
, 'entry_background', 'red'),
(c
.pack
, (), {'padx' : 10, 'pady' : 10}),
alltests
= [(tests_1
, kw_1
)]
poslist
= ('nw', 'n', 'ne', 'en', 'e', 'es', 'se', 's', 'sw', 'ws', 'w', 'wn',)
'label_text' : 'Entry Field',
alltests
.append((tests_2
, kw_2
))
testData
= ((c
, alltests
),)
if __name__
== '__main__':