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

Method test_slice

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

Source from the content-addressed store, hash-verified

607 print "pattern.en.Sentence.constituents()"
608
609 def test_slice(self):
610 # Assert sentence slice.
611 v = self.text[0].slice(start=4, stop=6)
612 self.assertTrue(v.parent == self.text[0])
613 self.assertTrue(v.string == "with a")
614 # Assert sentence slice tag integrity.
615 self.assertTrue(v.words[0].type == "IN")
616 self.assertTrue(v.words[1].chunk == None)
617 print "pattern.en.Slice"
618
619 def test_chunk(self):
620 # Assert chunk with multiple words ("a fork").

Callers

nothing calls this directly

Calls 1

sliceMethod · 0.45

Tested by

no test coverage detected