Skip to content

Commit

Permalink
Add tests for PR #93
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvine committed Jul 15, 2019
1 parent a7b7b1a commit 8b8d8a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ def test_bad_json(self):

def test_custom_regex(self):
with self.assertRaises(Exception) as context:
model = markovify.NewlineText('This sucks.', reject_reg=r'sucks')
model = markovify.NewlineText('This sentence contains a custom bad character: #.', reject_reg=r'#')

with self.assertRaises(Exception) as context:
model = markovify.NewlineText('This sentence (would normall fail')

model = markovify.NewlineText('This sentence (would normall fail', well_formed = False)

if __name__ == '__main__':
unittest.main()

0 comments on commit 8b8d8a8

Please sign in to comment.