Example #1
0
def test__split_on_reg__1(string, pattern, length):
    tokens = list(utils.split_on_reg(pattern, string))
    assert (len(tokens) == length)
    assert (len(set(tokens)) == 1)
def test__split_on_reg__1(string, pattern, length):
    tokens = list(utils.split_on_reg(pattern, string))
    assert(len(tokens) == length)
    assert(len(set(tokens)) == 1)
Example #3
0
def test__split_on_reg__0(string):
    splitter = utils.split_on_reg(r"[-]+")
    assert (is_generator(splitter(string)))
def test__split_on_reg__0(string):
    splitter = utils.split_on_reg(r"[-]+")
    assert(is_generator(splitter(string)))