def test_format_path():
    formatter = Formatter()
    file_contents = dict(get_contents('tests/samples/'))
    formatter.format_path('tests/samples/', recursive=True)
    for k, v in get_contents('tests/samples/'):
        check_or_revert(file_contents, k, v)

    formatter.format_path('tests/samples/generators.py')
def test_format_path():
    formatter = Formatter()
    file_contents = dict(get_contents('tests/samples/'))
    formatter.format_path('tests/samples/', recursive=True)
    for k, v in get_contents('tests/samples/'):
        check_or_revert(file_contents, k, v)

    formatter.format_path('tests/samples/generators.py')
示例#3
0
def test_string():
    tools.eq_(
        Formatter.format_string('''a = 'b' '''),
        '''a = 'b'\n\n''',
    )

    formatter = Formatter()
    formatter.format_path('tests/samples/continuations.py')