diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2015-02-05 16:15:15 -0500 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2015-02-05 16:15:15 -0500 |
commit | 97dcfbca0ce99e89a6ca68b67b7dd74bc22ed615 (patch) | |
tree | 2c46dd41a7329ff09c5e4d1a4583ff12b70a3624 | |
parent | 691afe42cf655f1ce0e8c80d3c8be12500282f19 (diff) | |
download | isort-97dcfbca0ce99e89a6ca68b67b7dd74bc22ed615.tar.gz |
Add test for wrap length support
-rw-r--r-- | test_isort.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py index 96896288..a0a0dac5 100644 --- a/test_isort.py +++ b/test_isort.py @@ -143,6 +143,30 @@ def test_line_length(): " lib21, lib22)\n") + test_output = SortImports(file_contents=REALLY_LONG_IMPORT, line_length=42, wrap_length=32).output + assert test_output == ("from third_party import (lib1,\n" + " lib2,\n" + " lib3,\n" + " lib4,\n" + " lib5,\n" + " lib6,\n" + " lib7,\n" + " lib8,\n" + " lib9,\n" + " lib10,\n" + " lib11,\n" + " lib12,\n" + " lib13,\n" + " lib14,\n" + " lib15,\n" + " lib16,\n" + " lib17,\n" + " lib18,\n" + " lib20,\n" + " lib21,\n" + " lib22)\n") + + def test_output_modes(): """Test setting isort to use various output modes works as expected""" test_output_grid = SortImports(file_contents=REALLY_LONG_IMPORT, |