Source

rope_py3k / ropetest / objectinfertest.py

Diff from to

ropetest/objectinfertest.py

     def setUp(self):
         super(ObjectInferTest, self).setUp()
         self.project = testutils.sample_project()
-        self.pycore = self.project.get_pycore()
+        self.pycore = self.project.pycore
 
     def tearDown(self):
         testutils.remove_project(self.project)
     def test_simple_type_inferencing_for_chained_assignments(self):
         mod = 'class Sample(object):\n    pass\n' \
               'copied_sample = Sample'
-        mod_scope = self.project.get_pycore().get_string_scope(mod)
+        mod_scope = self.project.pycore.get_string_scope(mod)
         sample_class = mod_scope['Sample']
         copied_sample = mod_scope['copied_sample']
         self.assertEquals(sample_class.get_object(),
         mod = 'class Sample(object):\n    pass\n' \
               'sample_class = Sample\n' \
               'sample_class = sample_class\n'
-        mod_scope = self.project.get_pycore().get_string_scope(mod)
+        mod_scope = self.project.pycore.get_string_scope(mod)
         sample_class = mod_scope['Sample']
         sample_class_var = mod_scope['sample_class']
         self.assertEquals(sample_class.get_object(),
         src = 'class Sample(object):\n    pass\n' \
               'def a_func():\n    return Sample\n' \
               'a_var = a_func()\n'
-        scope = self.project.get_pycore().get_string_scope(src)
+        scope = self.project.pycore.get_string_scope(src)
         sample_class = scope['Sample']
         a_var = scope['a_var']
         self.assertEquals(sample_class.get_object(), a_var.get_object())
         src = 'class Sample(object):\n    pass\n' \
               'def a_func():\n    return Sample()\n' \
               'a_var = a_func()\n'
-        scope = self.project.get_pycore().get_string_scope(src)
+        scope = self.project.pycore.get_string_scope(src)
         sample_class = scope['Sample'].get_object()
         a_var = scope['a_var'].get_object()
         self.assertEquals(sample_class, a_var.get_type())
               '    if True:\n        return Sample()\n' \
               '    else:\n        return a_func()\n' \
               'a_var = a_func()\n'
-        scope = self.project.get_pycore().get_string_scope(src)
+        scope = self.project.pycore.get_string_scope(src)
         sample_class = scope['Sample'].get_object()
         a_var = scope['a_var'].get_object()
         self.assertEquals(sample_class, a_var.get_type())
         src = 'class Sample(object):\n' \
               '    def __call__(self):\n        return Sample\n' \
               'sample = Sample()\na_var = sample()'
-        scope = self.project.get_pycore().get_string_scope(src)
+        scope = self.project.pycore.get_string_scope(src)
         sample_class = scope['Sample']
         a_var = scope['a_var']
         self.assertEquals(sample_class.get_object(), a_var.get_object())