def test_create_two_shingles(): seq = tokenize(tokenizer, "public void main()")[1:] result = get_shingles_str(create_two_shingles(seq)) estimated_result = {('public', 'void'), ('void', 'main'), ('main', '('), ('(', ')')} assert result == estimated_result seq = tokenize(tokenizer, "public int main()")[1:] result = get_shingles_str(create_two_shingles(seq)) estimated_result = {('public', 'int'), ('int', 'main'), ('main', '('), ('(', ')')} assert result == estimated_result
def test_create_two_shingles(): seq = tokenize(tokenizer, "public void main()")[1:] result = create_two_shingles(seq) seq = tokenize(tokenizer, "public int main()")[1:] result = create_two_shingles(seq) assert False == result