From b266addfd4e4aefd3c6137f3df39737e67eeb2ce Mon Sep 17 00:00:00 2001 From: Lie Ryan Date: Tue, 30 Jan 2024 15:36:43 +1100 Subject: [PATCH] Fix import_aliases config key in sample_project --- ropetest/contrib/autoimporttest.py | 2 +- ropetest/testutils.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ropetest/contrib/autoimporttest.py b/ropetest/contrib/autoimporttest.py index ac0dd9df7..d72f3f23f 100644 --- a/ropetest/contrib/autoimporttest.py +++ b/ropetest/contrib/autoimporttest.py @@ -142,7 +142,7 @@ def test_search_alias(self): def test_alias_updated_from_prefs(self): self.mod2.write("myvar = None\n") - self.project.prefs.import_aliases = [("mod2_alias", "pkg.mod2")] + self.project.prefs.autoimport.aliases = [("mod2_alias", "pkg.mod2")] self.importer.clear_cache() self.importer.update_resource(self.mod2) import_statement = ("import pkg.mod2 as mod2_alias", "mod2_alias") diff --git a/ropetest/testutils.py b/ropetest/testutils.py index f836fb8c4..11f58ccfe 100644 --- a/ropetest/testutils.py +++ b/ropetest/testutils.py @@ -26,7 +26,6 @@ def sample_project(foldername=None, **kwds): "automatic_soa": False, "ignored_resources": [".ropeproject", "*.pyc"], "import_dynload_stdmods": False, - "import_aliases": [], } prefs.update(kwds) project = rope.base.project.Project(root, **prefs)