Skip to content

Commit

Permalink
Added tests for b_prefixes()
Browse files Browse the repository at this point in the history
  • Loading branch information
ikuyamada committed Aug 18, 2014
1 parent 4fe675b commit 566bd81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_dawg.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ def test_prefixes(self):
assert d.prefixes("x") == []
assert d.prefixes("bar") == ["bar"]

def test_b_prefixes(self):
d = self.dawg()
assert d.b_prefixes(b"foobarz") == [b"f", b"foo", b"foobar"]
assert d.b_prefixes(b"x") == []
assert d.b_prefixes(b"bar") == [b"bar"]

def test_iterprefixes(self):
d = self.dawg()
assert list(d.iterprefixes("foobarz")) == d.prefixes("foobarz")
Expand Down

0 comments on commit 566bd81

Please sign in to comment.