Example #1
0
def test_index_dict_dict_int():
    exp = {
        "offsets": {"wakka": {"jawaka": 21, "__total__": 10}, "__total__": 0},
        "sizes": {"wakka": {"jawaka": 2, "__total__": 15}, "__total__": 27},
    }
    s, obs = index({"wakka": {"jawaka": 42}})
    assert exp == obs
Example #2
0
def test_index_dict_str():
    exp = {
        "offsets": {"wakka": 10, "__total__": 0},
        "sizes": {"wakka": 8, "__total__": 20},
    }
    s, obs = index({"wakka": "jawaka"})
    assert exp == obs
Example #3
0
def test_index_dict_dict_int():
    exp = {
        "offsets": {"wakka": {"jawaka": 21, "__total__": 10}, "__total__": 0},
        "sizes": {"wakka": {"jawaka": 2, "__total__": 15}, "__total__": 27},
    }
    s, obs = index({"wakka": {"jawaka": 42}})
    assert exp == obs
Example #4
0
def test_index_dict_str():
    exp = {
        "offsets": {"wakka": 10, "__total__": 0},
        "sizes": {"wakka": 8, "__total__": 20},
    }
    s, obs = index({"wakka": "jawaka"})
    assert exp == obs
Example #5
0
def test_index_dict_dict_int():
    exp = {'offsets': {'wakka': {'jawaka': 21, '__total__': 10},
                      '__total__': 0,
                      },
           'sizes': {'wakka': {'jawaka': 2, '__total__': 15},
                    '__total__': 27}
           }
    s, obs = index({'wakka': {'jawaka': 42}})
    assert_equal(exp, obs)
Example #6
0
def test_index_dict_dict_int():
    exp = {'offsets': {'wakka': {'jawaka': 21, '__total__': 10},
                      '__total__': 0,
                      },
           'sizes': {'wakka': {'jawaka': 2, '__total__': 15}, 
                    '__total__': 27}
           }
    s, obs = index({'wakka': {'jawaka': 42}})
    assert_equal(exp, obs)
Example #7
0
def test_index_dict_str():
    exp = {
        'offsets': {
            'wakka': 10,
            '__total__': 0
        },
        'sizes': {
            'wakka': 8,
            '__total__': 20
        }
    }
    s, obs = index({'wakka': 'jawaka'})
    assert exp == obs
Example #8
0
def test_index_dict_int():
    exp = {
        'offsets': {
            'wakka': 10,
            '__total__': 0
        },
        'sizes': {
            'wakka': 2,
            '__total__': 14
        }
    }
    s, obs = index({'wakka': 42})
    assert exp == obs
Example #9
0
def test_index_dict_str():
    exp = {'offsets': {'wakka': 10, '__total__': 0}, 
           'sizes': {'wakka': 8, '__total__': 20}}
    s, obs = index({'wakka': 'jawaka'})
    assert_equal(exp, obs)
Example #10
0
def test_index_list_int_str():
    exp = {'offsets': [1, 5, 14, 0], 'sizes': [2, 7, 8, 24]}
    s, obs = index([42, 'wakka', 'jawaka'])
    assert_equal(exp, obs)
Example #11
0
def test_index_list_str():
    exp = {'offsets': [1, 10, 0], 'sizes': [7, 8, 20]}
    s, obs = index(['wakka', 'jawaka'])
    assert_equal(exp, obs)
Example #12
0
def test_index_str():
    exp = {'offsets': 0, 'sizes': 7}
    s, obs = index('wakka')
    assert_equal(exp, obs)
Example #13
0
def test_index_int():
    exp = {'offsets': 0, 'sizes': 2}
    s, obs = index(42)
    assert_equal(exp, obs)
Example #14
0
def test_index_str():
    exp = {'offsets': 0, 'sizes': 7}
    s, obs = index('wakka')
    assert_equal(exp, obs)
Example #15
0
def test_index_list_str_int():
    exp = {"offsets": [1, 10, 0], "sizes": [7, 2, 14]}
    s, obs = index(["wakka", 42])
    assert exp == obs
Example #16
0
def test_index_list_ints():
    exp = {'offsets': [1, 4, 0], 'sizes': [1, 2, 8]}
    s, obs = index([1, 42])
    assert exp == obs
Example #17
0
def test_index_str():
    exp = {'offsets': 0, 'sizes': 7}
    s, obs = index('wakka')
    assert exp == obs
Example #18
0
def test_index_int():
    exp = {"offsets": 0, "sizes": 2}
    s, obs = index(42)
    assert exp == obs
Example #19
0
def test_index_str():
    exp = {"offsets": 0, "sizes": 7}
    s, obs = index("wakka")
    assert exp == obs
Example #20
0
def test_index_list_ints():
    exp = {"offsets": [1, 4, 0], "sizes": [1, 2, 8]}
    s, obs = index([1, 42])
    assert exp == obs
Example #21
0
def test_index_list_int_str():
    exp = {"offsets": [1, 5, 14, 0], "sizes": [2, 7, 8, 24]}
    s, obs = index([42, "wakka", "jawaka"])
    assert exp == obs
Example #22
0
def test_index_list_str_int():
    exp = {"offsets": [1, 10, 0], "sizes": [7, 2, 14]}
    s, obs = index(["wakka", 42])
    assert exp == obs
Example #23
0
def test_index_list_str():
    exp = {"offsets": [1, 10, 0], "sizes": [7, 8, 20]}
    s, obs = index(["wakka", "jawaka"])
    assert exp == obs
Example #24
0
def test_index_list_str():
    exp = {'offsets': [1, 10, 0], 'sizes': [7, 8, 20]}
    s, obs = index(['wakka', 'jawaka'])
    assert exp == obs
Example #25
0
def test_index_list_int_str():
    exp = {"offsets": [1, 5, 14, 0], "sizes": [2, 7, 8, 24]}
    s, obs = index([42, "wakka", "jawaka"])
    assert exp == obs
Example #26
0
def test_index_list_str_int():
    exp = {'offsets': [1, 10, 0], 'sizes': [7, 2, 14]}
    s, obs = index(['wakka', 42])
    assert exp == obs
Example #27
0
def test_index_int():
    exp = {"offsets": 0, "sizes": 2}
    s, obs = index(42)
    assert exp == obs
Example #28
0
def test_index_list_int_str():
    exp = {'offsets': [1, 5, 14, 0], 'sizes': [2, 7, 8, 24]}
    s, obs = index([42, 'wakka', 'jawaka'])
    assert exp == obs
Example #29
0
def test_index_int():
    exp = {'offsets': 0, 'sizes': 2}
    s, obs = index(42)
    assert_equal(exp, obs)
Example #30
0
def test_index_str():
    exp = {'offsets': 0, 'sizes': 7}
    s, obs = index('wakka')
    assert exp ==  obs
Example #31
0
def test_index_list_ints():
    exp = {'offsets': [1, 4, 0], 'sizes': [1, 2, 8]}
    s, obs = index([1, 42])
    assert_equal(exp, obs)
Example #32
0
def test_index_int():
    exp = {'offsets': 0, 'sizes': 2}
    s, obs = index(42)
    assert exp == obs
Example #33
0
def test_index_list_str_int():
    exp = {'offsets': [1, 10, 0], 'sizes': [7, 2, 14]}
    s, obs = index(['wakka', 42])
    assert_equal(exp, obs)
Example #34
0
def test_index_str():
    exp = {"offsets": 0, "sizes": 7}
    s, obs = index("wakka")
    assert exp == obs
Example #35
0
def test_index_dict_int():
    exp = {'offsets': {'wakka': 10, '__total__': 0}, 
           'sizes': {'wakka': 2, '__total__': 14}}
    s, obs = index({'wakka': 42})
    assert_equal(exp, obs)
Example #36
0
def test_index_list_ints():
    exp = {"offsets": [1, 4, 0], "sizes": [1, 2, 8]}
    s, obs = index([1, 42])
    assert exp == obs
Example #37
0
def test_index_int():
    exp = {'offsets': 0, 'sizes': 2}
    s, obs = index(42)
    assert exp ==  obs
Example #38
0
def test_index_list_str():
    exp = {"offsets": [1, 10, 0], "sizes": [7, 8, 20]}
    s, obs = index(["wakka", "jawaka"])
    assert exp == obs