Example #1
0
def test_soft_break_and_hyphenate():
    hyphenate = functools.partial(soft_hyphenate, length=6)
    assert soft_break("com.reallyreallyreally.long.path", 6,
                      hyphenate) == ZWSP.join([
                          "com.",
                          SHY.join(["really"] * 3) + ".", "long.", "path"
                      ])
Example #2
0
def test_soft_break():
    assert soft_break(
        "com.example.package.method(argument).anotherMethod(argument)",
        15) == ZWSP.join([
            "com.", "example.", "package.", "method(", "argument).",
            "anotherMethod(", "argument)"
        ])
Example #3
0
def test_soft_break():
    assert soft_break(
        'com.example.package.method(argument).anotherMethod(argument)',
        15) == ZWSP.join([
            'com.', 'example.', 'package.', 'method(', 'argument).',
            'anotherMethod(', 'argument)'
        ])
Example #4
0
def test_soft_break_and_hyphenate():
    hyphenate = functools.partial(soft_hyphenate, length=6)
    assert soft_break('com.reallyreallyreally.long.path', 6, hyphenate) == \
        ZWSP.join(['com.', SHY.join(['really'] * 3) + '.', 'long.', 'path'])
Example #5
0
def test_soft_break_and_hyphenate():
    hyphenate = functools.partial(soft_hyphenate, length=6)
    assert soft_break('com.reallyreallyreally.long.path', 6, hyphenate) == \
        ZWSP.join(['com.', SHY.join(['really'] * 3) + '.', 'long.', 'path'])
Example #6
0
def test_soft_break():
    assert soft_break(
        'com.example.package.method(argument).anotherMethod(argument)', 15
    ) == ZWSP.join(
        ['com.', 'example.', 'package.', 'method(', 'argument).', 'anotherMethod(', 'argument)']
    )