Beispiel #1
0
def test_selectcontains():

    table = (('foo', 'bar', 'baz'), ('aaa', 4, 9.3), ('aa', 2, 88.2),
             ('bab', 1, 23.3), ('c', 8, 42.0), ('d', 7, 100.9), ('c', 2))

    actual = selectcontains(table, 'foo', 'a')
    expect = (('foo', 'bar', 'baz'), ('aaa', 4, 9.3), ('aa', 2, 88.2),
              ('bab', 1, 23.3))
    ieq(expect, actual)
    ieq(expect, actual)  # check can iterate twice
Beispiel #2
0
def test_selectcontains():

    table = (
        ("foo", "bar", "baz"),
        ("aaa", 4, 9.3),
        ("aa", 2, 88.2),
        ("bab", 1, 23.3),
        ("c", 8, 42.0),
        ("d", 7, 100.9),
        ("c", 2),
    )

    actual = selectcontains(table, "foo", "a")
    expect = (("foo", "bar", "baz"), ("aaa", 4, 9.3), ("aa", 2, 88.2), ("bab", 1, 23.3))
    ieq(expect, actual)
    ieq(expect, actual)  # check can iterate twice
Beispiel #3
0
def test_selectcontains():
    
    table = (('foo', 'bar', 'baz'),
             ('aaa', 4, 9.3),
             ('aa', 2, 88.2),
             ('bab', 1, 23.3),
             ('c', 8, 42.0),
             ('d', 7, 100.9),
             ('c', 2))

    actual = selectcontains(table, 'foo', 'a')
    expect = (('foo', 'bar', 'baz'),
              ('aaa', 4, 9.3),
              ('aa', 2, 88.2),
              ('bab', 1, 23.3))
    ieq(expect, actual)
    ieq(expect, actual)  # check can iterate twice