Skip to content
Myr

test_formatting.py

This file

Path

tests/test_formatting.py

50 lines · 1.1 KiB · Python

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than a5a0471 point at it.

Updated the exampleArmin Ronacherbefore adoptiona5a0471

lines 1–50why, one step back
1# -*- coding: utf-8 -*-
2import click345def test_basic_functionality(runner):6 @click.command()7 def cli():8 """First paragraph.910 This is a very long second11 paragraph and not correctly12 wrapped but it will be rewrapped.1314 \b15 This is16 a paragraph17 without rewrapping.1819 \b20 121 222 32324 And this is a paragraph25 that will be rewrapped again.26 """2728 result = runner.invoke(cli, ['--help'], terminal_width=60)29 assert not result.exception30 assert result.output.splitlines() == [31 'Usage: cli [OPTIONS]',32 '',33 ' First paragraph.',34 '',35 ' This is a very long second paragraph and not correctly',36 ' wrapped but it will be rewrapped.',37 '',38 ' This is',39 ' a paragraph',40 ' without rewrapping.',41 '',42 ' 1',43 ' 2',44 ' 3',45 '',46 ' And this is a paragraph that will be rewrapped again.',47 '',48 'Options:',49 ' --help Show this message and exit.',50 ]