def test_is_not_variable(self): self.assertFalse(eliza.is_variable('is it?')) self.assertFalse(eliza.is_variable('? why?')) self.assertFalse(eliza.is_variable('?')) self.assertFalse(eliza.is_variable(['?x'])) self.assertFalse(eliza.is_variable('?foo bar'))
def test_is_variable(self): self.assertTrue(eliza.is_variable('?x')) self.assertTrue(eliza.is_variable('?subj'))