Commits

Ali Gholami Rudi  committed 1dad47f

autoimport: renamed get_imports to import_assist

  • Participants
  • Parent commits 883eb3b

Comments (0)

Files changed (2)

File rope/contrib/autoimport.py

     def write(self):
         self.project.data_files.write_data('globalnames', self.names)
 
-    def get_imports(self, starting):
+    def import_assist(self, starting):
         # XXX: breaking if gave up! use generators
         result = []
         for module in self.names:

File ropetest/contrib/autoimporttest.py

         super(AutoImportTest, self).tearDown()
 
     def test_simple_case(self):
-        self.assertEquals([], self.importer.get_imports('A'))
+        self.assertEquals([], self.importer.import_assist('A'))
 
     def test_update_resource(self):
         self.mod1.write('myvar = None\n')
         self.importer.update_resource(self.mod1)
         self.assertEquals([('myvar', 'mod1')],
-                          self.importer.get_imports('myva'))
+                          self.importer.import_assist('myva'))
 
     def test_update_module(self):
         self.mod1.write('myvar = None')
         self.importer.update_module('mod1')
         self.assertEquals([('myvar', 'mod1')],
-                          self.importer.get_imports('myva'))
+                          self.importer.import_assist('myva'))
 
     def test_update_non_existent_module(self):
         self.importer.update_module('does_not_exists_this')
-        self.assertEquals([], self.importer.get_imports('myva'))
+        self.assertEquals([], self.importer.import_assist('myva'))
 
     def test_module_with_syntax_errors(self):
         self.mod1.write('this is a syntax error\n')
         self.importer.update_resource(self.mod1)
-        self.assertEquals([], self.importer.get_imports('myva'))
+        self.assertEquals([], self.importer.import_assist('myva'))
 
     def test_excluding_imported_names(self):
         self.mod1.write('import pkg\n')
         self.importer.update_resource(self.mod1)
-        self.assertEquals([], self.importer.get_imports('pkg'))
+        self.assertEquals([], self.importer.import_assist('pkg'))
 
 
 if __name__ == '__main__':