diff --git a/pyflakes/test/test_imports.py b/pyflakes/test/test_imports.py index eb96d6a7..bfad5812 100644 --- a/pyflakes/test/test_imports.py +++ b/pyflakes/test/test_imports.py @@ -1095,6 +1095,25 @@ def test_tuple_concatenation_assignment(self): __all__ = ('a',) + ('b',) + ('c',) ''', m.UndefinedExport, m.UndefinedExport, m.UndefinedExport, m.UnusedImport) + def test_ignores_concatenated_assignment_with_var(self): + self.flakes(''' + x = ['this_is_not_visible'] + __all__ = x + ['a'] + ''', m.UndefinedExport) + + def test_ignores_multi_concatenated_assignment_with_var(self): + self.flakes(''' + x = ['this_is_not_visible'] + __all__ = ['this_is_also_not_visible'] + x + ['b'] + ''', m.UndefinedExport) + + def test_ignores_all_with_unknown_value(self): + self.flakes(''' + import export + x = ('export',) + __all__ = x + ''', m.UnusedImport) + def test_all_with_attributes(self): self.flakes(''' from foo import bar