MCPcopy Index your code
hub / github.com/clips/pattern / test_subjunctive

Method test_subjunctive

test/test_en.py:776–786  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

774 print "pattern.en.modality.conditional()"
775
776 def test_subjunctive(self):
777 # Assert True for sentences that contain wishes, judgments or opinions.
778 from pattern.text.en.modality import subjunctive
779 for b, s in (
780 (True, "I wouldn't do that if I were you."),
781 (True, "I wish I knew."),
782 (True, "I propose that you be on time."),
783 (True, "It is a bad idea to be late."),
784 (False, "I will be late.")):
785 self.assertEqual(subjunctive(en.Sentence(en.parse(s))), b)
786 print "pattern.en.modality.subjunctive()"
787
788 def test_negated(self):
789 # Assert True for sentences that contain "not", "n't" or "never".

Callers

nothing calls this directly

Calls 2

subjunctiveFunction · 0.90
parseMethod · 0.45

Tested by

no test coverage detected