Exemplo n.º 1
0
def test_length_unique():
    """Getting the number of keys."""
    flex = FlexDict(DATA)
    assert flex.length(unique=True) == 3
Exemplo n.º 2
0
def test_length_nested_unique():
    """Recursively getting the total number of unique keys."""
    flex = FlexDict(DATA)
    assert flex.length(nested=True, unique=True) == 8
Exemplo n.º 3
0
def test_length():
    """Getting the dictionary length."""
    flex = FlexDict(DATA)
    assert flex.length() == 3