Changeset 2823:275eeb504cf1 in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/30/07 17:47:28 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Use with blocks in test tree.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • test/test_xfind.py

    r2822 r2823  
    363363    assert list(e.walknode(xfind.css("*:first-child + p"))) == [e[2]] 
    364364 
    365     e = xsc.Frag(html.span(html.b("hurz"), "gurk", html.em("hinz"), html.em("kunz")), html.em("hurz"), html.em("hinz"), "nix", html.i("kunz")) 
     365    with xsc.Frag() as e: 
     366        +html.span(html.b("hurz"), "gurk", html.em("hinz"), html.em("kunz")) 
     367        +html.em("hurz") 
     368        +html.em("hinz") 
     369        +xsc.Text("nix") 
     370        +html.i("kunz") 
    366371    assert list(e.walknode(xfind.css("*:only-of-type"))) == [e[0], e[0][0], e[4]] 
    367372    assert list(e.walknode(xfind.css("*:nth-child(1)"))) == [e[0], e[0][0]] 
     
    377382    assert list(e.walknode(xfind.css("*:only-child"))) == [e[0], e[0][0]] 
    378383 
    379     e = xsc.Frag(html.em(class_="gurk", lang="en"), html.em(class_="gurk hurz", lang="en-us"), html.em(class_="hurz", lang="de")) 
     384    with xsc.Frag() as e: 
     385        +html.em(class_="gurk", lang="en") 
     386        +html.em(class_="gurk hurz", lang="en-us") 
     387        +html.em(class_="hurz", lang="de") 
    380388    assert list(e.walknode(xfind.css("em[class='gurk']"))) == [e[0]] 
    381389    assert list(e.walknode(xfind.css("em[class~='gurk']"))) == [e[0], e[1]]