Changeset 2765:68056bedef5e in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/04/07 18:02:41 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Partially fix test_itemsslices(): Fix some item test, drop slice tests
(as slices don't work any more).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • test/test_xfind.py

    r2754 r2765  
    203203 
    204204    tests = [ 
    205         (ds[0]/(html.div & xfind.nthchild(0))/(html.div & xfind.nthchild(-1)), "5"), 
    206         (ds[0]/html.div/(html.div & xfind.nthchild(-1)), "567"), 
    207         (ds[0]/(html.div & xfind.nthchild(-1))/html.div, "67"), 
    208         (ds[0]/(html.div/html.div), "455667"), # we get 5 and 6 twice 
    209         (ds[0]/(html.div/html.div) & xfind.nthchild(2), "5"), # we get 5 and 6 twice 
    210         (ds[0]/html.div[:]/html.div[:], "455667"), 
     205        (ds[0]/html.div[0]/html.div[-1], "5"), 
     206        (ds[0]/html.div/html.div[-1], "567"), 
     207        (ds[0]/html.div[-1]/html.div, "67"), 
     208        (ds[0]/html.div/html.div, "455667"), # we get 5 and 6 twice 
     209        #(ds[0]/(html.div/html.div) & xfind.nthchild(2), "5"), # we get 5 and 6 twice 
     210        #(ds[0]/html.div[:]/html.div[:], "455667"), 
    211211        (ds[0]/html.div/html.p[0], ""), 
    212212        (ds[0]/html.p[0]/html.p[0], ""), 
     
    217217        # This is why the sequence starts with "12" and not "14" 
    218218        (ds[0]//html.div, "123455667"), 
    219      
    220         (ds[0]/html.div[1:2], "2"), 
    221         (ds[0]/html.div[1:-1]/html.div[1:-1], ""), 
    222         (ds[0]/html.div[1:-1]/html.div[-1:], "6"), 
    223219    ] 
    224220    for (got, exp) in tests: 
    225         yield check, node, got, exp 
     221        yield check, ds[0], got, exp 
    226222 
    227223