def edge_cases(self): t = FilterTree() t.add([1, 2], 'foo') t.add([1, 2], 'bar') t.add([2, ], 'baz') assert list(t.iter('foo')) == [[1, 2], ] assert list(t.iter('bar')) == [[1, 2], ] assert list(t.iter('baz')) == [[2, ], ]
def test_edge_cases(self): t = FilterTree() t.add([1, 2], 'foo') t.add([1, 2], 'bar') t.add([2, ], 'baz') assert list(t.iter('foo')) == [[1, 2], ] assert list(t.iter('bar')) == [[1, 2], ] assert list(t.iter('baz')) == [[2, ], ]
def works(self): t = FilterTree() t.add([1, 2, 5], 'foo') t.add([1, 2, 3, 5], 'bar') t.add([7, ], 'baz') assert list(t.iter('foo')) == [[1, 2], [5, ]] assert list(t.iter('bar')) == [[1, 2], [3, 5]] assert list(t.iter('baz')) == [[7, ], ]
def test_works(self): t = FilterTree() t.add([1, 2, 5], 'foo') t.add([1, 2, 3, 5], 'bar') t.add([7, ], 'baz') assert list(t.iter('foo')) == [[1, 2], [5, ]] assert list(t.iter('bar')) == [[1, 2], [3, 5]] assert list(t.iter('baz')) == [[7, ], ]
def path(self): t = FilterTree() t.add([1, 3, 4, 7], 'foo') assert t.path('foo') == [1, 3, 4, 7]
def test_path(self): t = FilterTree() t.add([1, 3, 4, 7], 'foo') assert t.path('foo') == [1, 3, 4, 7]