Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
brienna committed Jun 15, 2020
1 parent d6d826f commit a43ad84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ def test_max_words(self):
sent = text_model.make_sentence(max_words=0)
assert sent is None

def test_min_words(self):
text_model = self.sherlock_model
sent = text_model.make_sentence(min_words=5)
assert len(sent.split(' ')) >= 5

def test_newline_text(self):
with open(os.path.join(os.path.dirname(__file__), "texts/senate-bills.txt")) as f:
model = markovify.NewlineText(f.read())
Expand Down

0 comments on commit a43ad84

Please sign in to comment.