def test_dotted_import_as(self): b = "import foo.bar as bang" a = "from . import foo.bar as bang" self.check_both(b, a)