X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/048efa7476bec1b2e7df156f2790f3565ab5c6d8..c50b10749369b0175994c4da0c78876c71ae75dc:/tests/test_black.py?ds=sidebyside diff --git a/tests/test_black.py b/tests/test_black.py index 8a37197..cc53aa6 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -735,6 +735,14 @@ class BlackTestCase(unittest.TestCase): self.assertEqual(set(), black.get_future_imports(node)) node = black.lib2to3_parse("from some.module import black\n") self.assertEqual(set(), black.get_future_imports(node)) + node = black.lib2to3_parse( + "from __future__ import unicode_literals as _unicode_literals" + ) + self.assertEqual({"unicode_literals"}, black.get_future_imports(node)) + node = black.lib2to3_parse( + "from __future__ import unicode_literals as _lol, print" + ) + self.assertEqual({"unicode_literals", "print"}, black.get_future_imports(node)) def test_debug_visitor(self) -> None: source, _ = read_data("debug_visitor.py")