diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2015-02-19 00:53:39 -0500 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2015-02-19 00:53:39 -0500 |
commit | 61d9854a72d8bc3ce6c9c781a486744648421812 (patch) | |
tree | 5c7bb1ee3ee006c73632a863b8f70f8c9d4915ea | |
parent | c731b692634a5edfd5831bdba611795a3b1f9cfa (diff) | |
download | isort-feature/fix-issue-250.tar.gz |
Define desired behaviour when encountering jinja variables within import definitionsfeature/fix-issue-250
-rw-r--r-- | test_isort.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py index a26f8cc6..506f1ab1 100644 --- a/test_isort.py +++ b/test_isort.py @@ -1300,3 +1300,18 @@ from foo import ( lib7 ) """ + + +def test_uses_jinja_variables(): + """Test a basic set of imports that use jinja variables""" + test_input = ("import { sys }\n" + "import { os }\n" + "import { myproject.test }\n" + "import { django.settings }") + test_output = SortImports(file_contents=test_input, known_third_party=['django']).output + assert test_output == ("import { os }\n" + "import { sys }\n" + "\n" + "import { django.settings }\n" + "\n" + "import { myproject.test }\n") |