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

Method test_imperative

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

Source from the content-addressed store, hash-verified

734 pass
735
736 def test_imperative(self):
737 # Assert True for sentences that are orders, commands, warnings.
738 from pattern.text.en.modality import imperative
739 for b, s in (
740 (True, "Do your homework!"),
741 (True, "Do whatever you want."),
742 (True, "Do not listen to me."),
743 (True, "Turn that off, will you."),
744 (True, "Let's help him."),
745 (True, "Help me!"),
746 (True, "You will help me."),
747 (False, "Do it if you think it is necessary."),
748 (False, "I hope you will help me."),
749 (False, "I can help you."),
750 (False, "I can help you if you let me.")):
751 self.assertEqual(imperative(en.Sentence(en.parse(s))), b)
752 print "pattern.en.modality.imperative()"
753
754 def test_conditional(self):
755 # Assert True for sentences that contain possible or imaginary situations.

Callers

nothing calls this directly

Calls 2

imperativeFunction · 0.90
parseMethod · 0.45

Tested by

no test coverage detected