(self)
| 752 | print "pattern.en.modality.imperative()" |
| 753 | |
| 754 | def test_conditional(self): |
| 755 | # Assert True for sentences that contain possible or imaginary situations. |
| 756 | from pattern.text.en.modality import conditional |
| 757 | for b, s in ( |
| 758 | (True, "We ought to help him."), |
| 759 | (True, "We could help him."), |
| 760 | (True, "I will help you."), |
| 761 | (True, "I hope you will help me."), |
| 762 | (True, "I can help you if you let me."), |
| 763 | (False, "You will help me."), |
| 764 | (False, "I can help you.")): |
| 765 | self.assertEqual(conditional(en.Sentence(en.parse(s))), b) |
| 766 | # Assert predictive mood. |
| 767 | s = "I will help you." |
| 768 | v = conditional(en.Sentence(en.parse(s)), predictive=False) |
| 769 | self.assertEqual(v, False) |
| 770 | # Assert speculative mood. |
| 771 | s = "I will help you if you pay me." |
| 772 | v = conditional(en.Sentence(en.parse(s)), predictive=False) |
| 773 | self.assertEqual(v, True) |
| 774 | print "pattern.en.modality.conditional()" |
| 775 | |
| 776 | def test_subjunctive(self): |
| 777 | # Assert True for sentences that contain wishes, judgments or opinions. |
nothing calls this directly
no test coverage detected