cdocutils.nodes document q)q}q(U nametypesq}qX.caf api tests: barslidebackgorundelement classqNsUsubstitution_defsq}qUparse_messagesq ]q Ucurrent_sourceq NU decorationq NUautofootnote_startq KUnameidsq}qhU-caf-api-tests-barslidebackgorundelement-classqsUchildrenq]q(cdocutils.nodes comment q)q}q(U rawsourceqX -*- rest -*-qUparentqhUsourceqcdocutils.nodes reprunicode qX;/home/pmajka/4/doc/sphinx/source/test_barImageUnderlays.rstqq}qbUtagnameqUcommentqU attributesq }q!(U xml:spaceq"Upreserveq#Uidsq$]q%Ubackrefsq&]q'Udupnamesq(]q)Uclassesq*]q+Unamesq,]q-uUlineq.KUdocumentq/hh]q0cdocutils.nodes Text q1X -*- rest -*-q2q3}q4(hUhhubaubh)q5}q6(hXvim:syntax=restq7hhhhhhh }q8(h"h#h$]q9h&]q:h(]q;h*]qh1Xvim:syntax=restq?q@}qA(hUhh5ubaubcdocutils.nodes section qB)qC}qD(hUhhhhhUsectionqEh }qF(h(]qGh*]qHh&]qIh$]qJhah,]qKhauh.Kh/hh]qL(cdocutils.nodes title qM)qN}qO(hX3CAF API tests: ``barSlideBackgorundElement`` classqPhhChhhUtitleqQh }qR(h(]qSh*]qTh&]qUh$]qVh,]qWuh.Kh/hh]qX(h1XCAF API tests: qYqZ}q[(hXCAF API tests: q\hhNubcdocutils.nodes literal q])q^}q_(hX``barSlideBackgorundElement``q`h }qa(h(]qbh*]qch&]qdh$]qeh,]qfuhhNh]qgh1XbarSlideBackgorundElementqhqi}qj(hUhh^ubahUliteralqkubh1X classqlqm}qn(hX classqohhNubeubcdocutils.nodes paragraph qp)qq}qr(hX@Obviously, we need to import bar module and the proper extensionqshhChhhU paragraphqth }qu(h(]qvh*]qwh&]qxh$]qyh,]qzuh.Kh/hh]q{h1X@Obviously, we need to import bar module and the proper extensionq|q}}q~(hhshhqubaubcdocutils.nodes literal_block q)q}q(hXN>>> import bar >>> from bar.barImageUnderlays import barSlideBackgorundElementqhhChhhU literal_blockqh }q(U testnodetypeqXdoctestqh"h#h$]qh&]qh(]qh*]qh,]qUgroupsq]qUdefaultqaUoptionsq}quh.K h/hh]qh1XN>>> import bar >>> from bar.barImageUnderlays import barSlideBackgorundElementqq}q(hUhhubaubhp)q}q(hXCChecking default parameters of the barSlideBackgorundElement class:qhhChhhhth }q(h(]qh*]qh&]qh$]qh,]quh.Kh/hh]qh1XCChecking default parameters of the barSlideBackgorundElement class:qq}q(hhhhubaubh)q}q(hX>>> bck = barSlideBackgorundElement() Traceback (most recent call last): TypeError: __init__() takes at least 2 arguments (1 given)qhhChhhhh }q(U testnodetypeqXdoctestqh"h#h$]qh&]qh(]qh*]qh,]qUgroupsq]qhah}quh.Kh/hh]qh1X>>> bck = barSlideBackgorundElement() Traceback (most recent call last): TypeError: __init__() takes at least 2 arguments (1 given)qq}q(hUhhubaubhp)q}q(hXBThe only required parameter is a imageLink which has to be string.qhhChhhhth }q(h(]qh*]qh&]qh$]qh,]quh.Kh/hh]qh1XBThe only required parameter is a imageLink which has to be string.qq}q(hhhhubaubh)q}q(hX>>> bck = barSlideBackgorundElement('anyimage.tiff') >>> print bck qhhChhhhh }q(U testnodetypeqXdoctestqh"h#h$]qh&]qh(]qh*]qh,]qUgroupsq]qhaUtestqX>>> bck = barSlideBackgorundElement('anyimage.tiff') >>> print bck #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE qh}quh.Kh/hh]qh1X>>> bck = barSlideBackgorundElement('anyimage.tiff') >>> print bck q҅q}q(hUhhubaubhp)q}q(hXyThe size and the position attributes are optional arguments and they are required to be tuples of two floats or integers:qhhChhhhth }q(h(]qh*]qh&]qh$]qh,]quh.Kh/hh]qh1XyThe size and the position attributes are optional arguments and they are required to be tuples of two floats or integers:q߅q}q(hhhhubaubh)q}q(hX>>> bck = barSlideBackgorundElement('anyimage.tiff', size = (100,100)) >>> print bck >>> bck = barSlideBackgorundElement('anyimage.tiff', size = (10.5,10.5)) >>> print bck qhhChhhhh }q(U testnodetypeqXdoctestqh"h#h$]qh&]qh(]qh*]qh,]qUgroupsq]qhahX>>> bck = barSlideBackgorundElement('anyimage.tiff', size = (100,100)) >>> print bck #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE >>> bck = barSlideBackgorundElement('anyimage.tiff', size = (10.5,10.5)) >>> print bck #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE qh}quh.K!h/hh]qh1X>>> bck = barSlideBackgorundElement('anyimage.tiff', size = (100,100)) >>> print bck >>> bck = barSlideBackgorundElement('anyimage.tiff', size = (10.5,10.5)) >>> print bck qq}q(hUhhubaubhp)q}q(hXEPassing values other than integers or floats will raise an exception:qhhChhhhth }q(h(]qh*]qh&]qh$]qh,]quh.K+h/hh]qh1XEPassing values other than integers or floats will raise an exception:qr}r(hhhhubaubh)r}r(hXC>>> bck = barSlideBackgorundElement('anyimage.tiff', size = (10.5,None)) Traceback (most recent call last): ... TypeError: float() argument must be a string or a number >>> bck = barSlideBackgorundElement('anyimage.tiff', size = 'string') Traceback (most recent call last): ... ValueError: invalid literal for float(): srhhChhhhh }r(U testnodetyperXdoctestrh"h#h$]rh&]r h(]r h*]r h,]r Ugroupsr ]rhahX>>> bck = barSlideBackgorundElement('anyimage.tiff', size = (10.5,None)) #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE Traceback (most recent call last): ... TypeError: float() argument must be a string or a number >>> bck = barSlideBackgorundElement('anyimage.tiff', size = 'string') #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE Traceback (most recent call last): ... ValueError: invalid literal for float(): srh}ruh.K-h/hh]rh1XC>>> bck = barSlideBackgorundElement('anyimage.tiff', size = (10.5,None)) Traceback (most recent call last): ... TypeError: float() argument must be a string or a number >>> bck = barSlideBackgorundElement('anyimage.tiff', size = 'string') Traceback (most recent call last): ... ValueError: invalid literal for float(): srr}r(hUhjubaubhp)r}r(hX$The same for the position attribute:rhhChhhhth }r(h(]rh*]rh&]rh$]rh,]ruh.K9h/hh]rh1X$The same for the position attribute:rr }r!(hjhjubaubh)r"}r#(hX>>> bck = barSlideBackgorundElement('anyimage.tiff', position = (100,100)) >>> print bck >>> bck = barSlideBackgorundElement('anyimage.tiff', position = (10.5,10.5)) >>> print bck r$hhChhhhh }r%(U testnodetyper&Xdoctestr'h"h#h$]r(h&]r)h(]r*h*]r+h,]r,Ugroupsr-]r.hahX>>> bck = barSlideBackgorundElement('anyimage.tiff', position = (100,100)) >>> print bck #doctest: +ELLIPSIS >>> bck = barSlideBackgorundElement('anyimage.tiff', position = (10.5,10.5)) >>> print bck #doctest: +ELLIPSIS r/h}r0uh.K;h/hh]r1h1X>>> bck = barSlideBackgorundElement('anyimage.tiff', position = (100,100)) >>> print bck >>> bck = barSlideBackgorundElement('anyimage.tiff', position = (10.5,10.5)) >>> print bck r2r3}r4(hUhj"ubaubhp)r5}r6(hXEPassing values other than integers or floats will raise an exception:r7hhChhhhth }r8(h(]r9h*]r:h&]r;h$]r<h,]r=uh.KEh/hh]r>h1XEPassing values other than integers or floats will raise an exception:r?r@}rA(hj7hj5ubaubh)rB}rC(hXQ>>> bck = barSlideBackgorundElement('anyimage.tiff', position = (None,10.5)) Traceback (most recent call last): ... TypeError: float() argument must be a string or a number >>> bck = barSlideBackgorundElement('anyimage.tiff', position = 'other string') Traceback (most recent call last): ... ValueError: invalid literal for float(): orDhhChhhhh }rE(U testnodetyperFXdoctestrGh"h#h$]rHh&]rIh(]rJh*]rKh,]rLUgroupsrM]rNhahX>>> bck = barSlideBackgorundElement('anyimage.tiff', position = (None,10.5)) #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE Traceback (most recent call last): ... TypeError: float() argument must be a string or a number >>> bck = barSlideBackgorundElement('anyimage.tiff', position = 'other string') #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE Traceback (most recent call last): ... ValueError: invalid literal for float(): orOh}rPuh.KGh/hh]rQh1XQ>>> bck = barSlideBackgorundElement('anyimage.tiff', position = (None,10.5)) Traceback (most recent call last): ... TypeError: float() argument must be a string or a number >>> bck = barSlideBackgorundElement('anyimage.tiff', position = 'other string') Traceback (most recent call last): ... ValueError: invalid literal for float(): orRrS}rT(hUhjBubaubhp)rU}rV(hXWThe description, modality and preparation attributes have to be strings or None values:rWhhChhhhth }rX(h(]rYh*]rZh&]r[h$]r\h,]r]uh.KTh/hh]r^h1XWThe description, modality and preparation attributes have to be strings or None values:r_r`}ra(hjWhjUubaubh)rb}rc(hX>>> bck = barSlideBackgorundElement('anyimage.tiff', position = (10.5,10.5)) >>> bck.description = 'A description of a background image' >>> bck.modality = 'Nissl' >>> bck.preparation = 'Microscope slices' >>> print bck rdhhChhhhh }re(U testnodetyperfXdoctestrgh"h#h$]rhh&]rih(]rjh*]rkh,]rlUgroupsrm]rnhahX>>> bck = barSlideBackgorundElement('anyimage.tiff', position = (10.5,10.5)) >>> bck.description = 'A description of a background image' >>> bck.modality = 'Nissl' >>> bck.preparation = 'Microscope slices' >>> print bck #doctest: +ELLIPSIS roh}rpuh.KVh/hh]rqh1X>>> bck = barSlideBackgorundElement('anyimage.tiff', position = (10.5,10.5)) >>> bck.description = 'A description of a background image' >>> bck.modality = 'Nissl' >>> bck.preparation = 'Microscope slices' >>> print bck rrrs}rt(hUhjbubaubhp)ru}rv(hXOther types sould not work:rwhhChhhhth }rx(h(]ryh*]rzh&]r{h$]r|h,]r}uh.K`h/hh]r~h1XOther types sould not work:rr}r(hjwhjuubaubh)r}r(hX>>> bck.modality = 3 Traceback (most recent call last): ... AssertionError: Stain has to be string or None. Non-string and not None value provided. Please provide string value.rhhChhhhh }r(U testnodetyperXdoctestrh"h#h$]rh&]rh(]rh*]rh,]rUgroupsr]rhahX>>> bck.modality = 3 #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE Traceback (most recent call last): ... AssertionError: Stain has to be string or None. Non-string and not None value provided. Please provide string value.rh}ruh.Kbh/hh]rh1X>>> bck.modality = 3 Traceback (most recent call last): ... AssertionError: Stain has to be string or None. Non-string and not None value provided. Please provide string value.rr}r(hUhjubaubhp)r}r(hX:The opacity attribute has to be a float-compatibile value:rhhChhhhth }r(h(]rh*]rh&]rh$]rh,]ruh.Kih/hh]rh1X:The opacity attribute has to be a float-compatibile value:rr}r(hjhjubaubh)r}r(hX>>> bck.opacity = 0 >>> bck.opacity = 0.4 >>> print bck >>> bck.opacity = 'd' Traceback (most recent call last): ... AssertionError: Opacity has to be float between 0 and 1 >>> bck.opacity = None Traceback (most recent call last): ... AssertionError: Opacity has to be float between 0 and 1rhhChhhhh }r(U testnodetyperXdoctestrh"h#h$]rh&]rh(]rh*]rh,]rUgroupsr]rhahXm>>> bck.opacity = 0 >>> bck.opacity = 0.4 >>> print bck #doctest: +ELLIPSIS >>> bck.opacity = 'd' #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE Traceback (most recent call last): ... AssertionError: Opacity has to be float between 0 and 1 >>> bck.opacity = None #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE Traceback (most recent call last): ... AssertionError: Opacity has to be float between 0 and 1rh}ruh.Kkh/hh]rh1X>>> bck.opacity = 0 >>> bck.opacity = 0.4 >>> print bck >>> bck.opacity = 'd' Traceback (most recent call last): ... AssertionError: Opacity has to be float between 0 and 1 >>> bck.opacity = None Traceback (most recent call last): ... AssertionError: Opacity has to be float between 0 and 1rr}r(hUhjubaubhp)r}r(hXDSerialized and reproduced object has to be equal to original object:rhhChhhhth }r(h(]rh*]rh&]rh$]rh,]ruh.K|h/hh]rh1XDSerialized and reproduced object has to be equal to original object:rr}r(hjhjubaubh)r}r(hX@>>> print str(bck.fromXML(bck.getXMLelement())) == str(bck) TruerhhChhhhh }r(U testnodetyperXdoctestrh"h#h$]rh&]rh(]rh*]rh,]rUgroupsr]rhah}ruh.K~h/hh]rh1X@>>> print str(bck.fromXML(bck.getXMLelement())) == str(bck) Truerr}r(hUhjubaubeubehUU transformerrNU footnote_refsr}rUrefnamesr}rUsymbol_footnotesr]rUautofootnote_refsr]rUsymbol_footnote_refsr]rU citationsr]rh/hU current_linerNUtransform_messagesr]rUreporterrNUid_startrKU autofootnotesr]rU citation_refsr}rUindirect_targetsr]rUsettingsr(cdocutils.frontend Values ror}r(Ufootnote_backlinksrKUrecord_dependenciesrNU rfc_base_urlrUhttp://tools.ietf.org/html/rU tracebackrUpep_referencesrNUstrip_commentsrNU toc_backlinksrUentryrU language_coderUenrU datestamprNU report_levelrKU _destinationrNU halt_levelrKU strip_classesrNhQNUerror_encoding_error_handlerrUbackslashreplacerUdebugrNUembed_stylesheetrUoutput_encoding_error_handlerrUstrictrU sectnum_xformrKUdump_transformsrNU docinfo_xformrKUwarning_streamr NUpep_file_url_templater Upep-%04dr Uexit_status_levelr KUconfigr NUstrict_visitorrNUcloak_email_addressesrUtrim_footnote_reference_spacerUenvrNUdump_pseudo_xmlrNUexpose_internalsrNUsectsubtitle_xformrU source_linkrNUrfc_referencesrNUoutput_encodingrUutf-8rU source_urlrNUinput_encodingrU utf-8-sigrU_disable_configrNU id_prefixrUU tab_widthrKUerror_encodingrUANSI_X3.4-1968r U_sourcer!U;/home/pmajka/4/doc/sphinx/source/test_barImageUnderlays.rstr"Ugettext_compactr#U generatorr$NUdump_internalsr%NU pep_base_urlr&Uhttp://www.python.org/dev/peps/r'Usyntax_highlightr(Ushortr)Uinput_encoding_error_handlerr*jUauto_id_prefixr+Uidr,Udoctitle_xformr-Ustrip_elements_with_classesr.NU _config_filesr/]r0Ufile_insertion_enabledr1KU raw_enabledr2KU dump_settingsr3NubUsymbol_footnote_startr4KUidsr5}r6hhCsUsubstitution_namesr7}r8hh/h }r9(h(]r:h$]r;h&]r<Usourcer=hh*]r>h,]r?uU footnotesr@]rAUrefidsrB}rCub.