예제 #1
0
 def test_can_partition_with_marker(self):
     t = Partitioner("~", "**")
     tokens = list(t.partition("foo**bar"))
     assert tokens == ["foo", "**", "bar"]
예제 #2
0
 def test_can_partition_with_marker_at_end(self):
     t = Partitioner("~", "**")
     tokens = list(t.partition("foo bar**"))
     assert tokens == ["foo bar", "**"]
예제 #3
0
 def test_can_partition_with_escaped_other(self):
     t = Partitioner("~", "**")
     tokens = list(t.partition("foo~bar"))
     assert tokens == ["foo~bar"]
예제 #4
0
 def test_can_partition_with_marker_at_start(self):
     t = Partitioner("~", "**")
     tokens = list(t.partition("**foo bar"))
     assert tokens == ["**", "foo bar"]