Test to ensure isort can correctly sort imports when the first found content is a function with a docstring
()
| 2964 | |
| 2965 | |
| 2966 | def test_function_with_docstring() -> None: |
| 2967 | """Test to ensure isort can correctly sort imports when the first found content is a |
| 2968 | function with a docstring |
| 2969 | """ |
| 2970 | add_imports = ["from __future__ import unicode_literals"] |
| 2971 | test_input = 'def foo():\n """ Single line triple quoted doctring """\n pass\n' |
| 2972 | expected_output = ( |
| 2973 | "from __future__ import unicode_literals\n" |
| 2974 | "\n" |
| 2975 | "\n" |
| 2976 | "def foo():\n" |
| 2977 | ' """ Single line triple quoted doctring """\n' |
| 2978 | " pass\n" |
| 2979 | ) |
| 2980 | assert isort.code(test_input, add_imports=add_imports) == expected_output |
| 2981 | |
| 2982 | |
| 2983 | def test_plone_style() -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected