コード例 #1
0
 def test_should_fail_with_concatenated_infix_words(self):
     self.assertFalse(
         twitlib.contains_movie('foois bar great.', 'foo bar')
     )
     self.assertFalse(
         twitlib.contains_movie('foobar great.', 'foo bar')
     )
コード例 #2
0
 def test_should_have_no_problems_with_digits(self):
     self.assertTrue(
         twitlib.contains_movie('like movie1', 'movie1')
     )
コード例 #3
0
 def test_should_work_with_concatenated_movie_titles_and_signs(self):
     self.assertTrue(
         twitlib.contains_movie('foo is bar great.', 'foo bar')
     )
コード例 #4
0
 def test_should_have_no_problems_with_tweet_beginnings(self):
     self.assertTrue(
         twitlib.contains_movie('thing', 'thing')
     )
コード例 #5
0
 def test_should_ignore_prefix_words(self):
     self.assertFalse(
         twitlib.contains_movie('hello something rocks', 'thing')
     )
コード例 #6
0
 def test_should_detect_valid_mentions(self):
     self.assertTrue(
         twitlib.contains_movie('hello some rocks', 'some')
     )