mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 04:36:52 +00:00
Bare bones of a notification system
This commit is contained in:
parent
f013698072
commit
7b2a1c157b
9 changed files with 209 additions and 0 deletions
14
tests/test_trie.py
Normal file
14
tests/test_trie.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from flake8 import _trie as trie
|
||||
|
||||
|
||||
def test_build_tree():
|
||||
tree = trie.Trie()
|
||||
for i in range(5):
|
||||
tree.add('E103', 'E103-listener-{0}'.format(i))
|
||||
j = i + 1
|
||||
tree.add('E1{0}3'.format(j), 'E1{0}3-listener'.format(j))
|
||||
for i in range(10):
|
||||
tree.add('W1{0:02d}'.format(i), 'W1{0:02d}-listener'.format(i))
|
||||
|
||||
assert tree.find('E103') is not None
|
||||
assert tree.find('E200') is None
|
||||
Loading…
Add table
Add a link
Reference in a new issue