void () { checkAddingNameInFromImport("from mod import foo", "bar", "foo", true, "from mod import bar, foo"); checkAddingNameInFromImport("from mod import foo", "bar", "foo", false, "from mod import foo, bar"); checkAddingNameInFromImport("from mod import foo", "bar", null, false, "from mod import bar, foo"); checkAddingNameInFromImport("from mod import foo", "bar", null, true, "from mod import foo, bar"); checkAddingNameInFromImport("from mod import (foo) # comment", "bar", "foo", true, "from mod import (bar, foo) # comment"); checkAddingNameInFromImport("from mod import (foo) # comment", "bar", "foo", false, "from mod import (foo, bar) # comment"); checkAddingNameInFromImport("from mod import (foo,)", "bar", "foo", false, "from mod import (foo, bar,)"); checkAddingNameInFromImport("from mod import (foo # comment\n" + " )", "bar", "foo", false, "from mod import (foo, bar # comment\n" + " )"); checkAddingNameInFromImport("from mod import ", "bar", null, false, "from mod import bar"); checkAddingNameInFromImport("from mod import ", "bar", null, true, "from mod import bar"); checkAddingNameInFromImport("from mod import (", "bar", null, true, "from mod import (bar"); // TODO change where the placeholder empty import element is added in such cases //checkAddingNameInFromImport("from mod import ( # comment", "bar", null, true, "from mod import (bar # comment"); checkAddingNameInFromImport("from mod import ()", "bar", null, true, "from mod import (bar)"); }