�
zfc @ s� d d l Z d d l Z d d l Z d d l m Z m Z d d l m Z e d � d e e j f d � � YZ
e
f Z e d k r� e e � n d S( i����N( t requirest run_unittest( t AbstractTkTestt guit StyleTestc B s> e Z d � Z d � Z d � Z d � Z d � Z d � Z RS( c C s, t t | � j � t j | j � | _ d S( N( t superR t setUpt ttkt Stylet roott style( t self( ( s7 /usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyR s c C sU | j } | j d d d �| j | j d d � d � | j | j d � t � d S( Nt TButtont
backgroundt yellow( R
t configuret assertEqualt assertIsInstancet dict( R R
( ( s7 /usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyt test_configure s
c C sm | j } | j d d d g �| j | j d d � | j rF d g n d g � | j | j d � t � d S( NR R
t activet blues active background( R R
R ( R R
R ( s active backgroundR ( R
t mapR t wantobjectsR R ( R R
( ( s7 /usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyt test_map s
c C s� | j } | j d d d �| j d d d g �| j | j d d � d � | j | j d d d d g � d � | j | j d d d d �d � d S(
NR R
R R R t optionnotdefinedt defaultt iknewit( R R
R ( R
R R R t lookup( R R
( ( s7 /usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyt test_lookup! s c C s� | j } | j t j | j d � | j d � } | j d d � | j | j d � d i d d 6f g � | j d | � | j | j d � | � | j | j d � t � | j t j | j d d i d d
6f g � d S( Nt
NotALayoutt Treeviewt t nullt nswet stickyR t namet
inexistentt option( R
t assertRaisest tkintert TclErrort layoutR R t list( R R
t tv_style( ( s7 /usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyt test_layout- s c C s� | j t j | j j d � | j j � } d } xA | j j � D], } | | k rA | } | j j | � PqA qA Wd S| j | | k � | j | | j j � k � | j j | � d S( Nt nonexistingname( R' R( R) R
t theme_uset Nonet theme_namest assertFalse( R t
curr_themet new_themet theme( ( s7 /usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyt test_theme_useD s ( t __name__t
__module__R R R R R- R6 ( ( ( s7 /usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyR s t __main__(
t unittestt TkinterR( R t test.test_supportR R t test_ttk.supportR t TestCaseR t tests_guiR7 ( ( ( s7 /usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyt