def test_include_pairs(rng): v = Vocabulary(10, rng=rng) v["A"] v["B"] v["C"] assert v.key_pairs is None v.include_pairs = True assert v.key_pairs == ["A*B", "A*C", "B*C"] v.include_pairs = False assert v.key_pairs is None v.include_pairs = True v["D"] assert v.key_pairs == ["A*B", "A*C", "B*C", "A*D", "B*D", "C*D"] v = Vocabulary(12, include_pairs=True, rng=rng) v["A"] v["B"] v["C"] assert v.key_pairs == ["A*B", "A*C", "B*C"]
def test_include_pairs(rng): v = Vocabulary(10, rng=rng) v['A'] v['B'] v['C'] assert v.key_pairs is None v.include_pairs = True assert v.key_pairs == ['A*B', 'A*C', 'B*C'] v.include_pairs = False assert v.key_pairs is None v.include_pairs = True v['D'] assert v.key_pairs == ['A*B', 'A*C', 'B*C', 'A*D', 'B*D', 'C*D'] v = Vocabulary(12, include_pairs=True) v['A'] v['B'] v['C'] assert v.key_pairs == ['A*B', 'A*C', 'B*C']
def test_include_pairs(rng): v = Vocabulary(10, rng=rng) v['A'] v['B'] v['C'] assert v.key_pairs is None v.include_pairs = True assert v.key_pairs == ['A*B', 'A*C', 'B*C'] v.include_pairs = False assert v.key_pairs is None v.include_pairs = True v['D'] assert v.key_pairs == ['A*B', 'A*C', 'B*C', 'A*D', 'B*D', 'C*D'] v = Vocabulary(12, include_pairs=True, rng=rng) v['A'] v['B'] v['C'] assert v.key_pairs == ['A*B', 'A*C', 'B*C']
def test_include_pairs(): v = Vocabulary(10) v["A"] v["B"] v["C"] assert v.key_pairs is None v.include_pairs = True assert v.key_pairs == ["A*B", "A*C", "B*C"] v.include_pairs = False assert v.key_pairs is None v.include_pairs = True v["D"] assert v.key_pairs == ["A*B", "A*C", "B*C", "A*D", "B*D", "C*D"] v = Vocabulary(12, include_pairs=True) v["A"] v["B"] v["C"] assert v.key_pairs == ["A*B", "A*C", "B*C"]