def test_len_symbol_empty(): assert Short.len_symbol(1) == 1 assert Short.len_symbol(2) == 2 assert Short.len_symbol(1) == 1 assert Short.len_symbol(-2) == 2 assert Short.len_symbol(-1) == 1
def test_len_symbol(): assert Short.len_symbol(1) == 1 for sym in SYM_POOL: Short.create(symbol=sym, target=sym, _commit=False) assert Short.len_symbol(0) == 2 assert Short.len_symbol(1) == 2 assert Short.len_symbol(2) == 2 assert Short.len_symbol(3) == 3
def test_len_symbol_fact(): assert Short.len_symbol(1) == 1 for a_sym in SYM_POOL: for b_sym in SYM_POOL: sym = a_sym + b_sym Short.create(symbol=sym, target=sym, _commit=False) Short.create(symbol=a_sym, target=a_sym, _commit=False) assert Short.len_symbol(0) == 3 assert Short.len_symbol(1) == 3 assert Short.len_symbol(2) == 3 assert Short.len_symbol(3) == 3 assert Short.len_symbol(4) == 4