<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -417,6 +417,22 @@ class DetectOptionsTest(unittest.TestCase):
         self.assertEquals(options, expected)
 
 
+    def testDetectModuleAttrLookupWithBase2(self):
+        print '--------'
+        source = dedent(&quot;&quot;&quot;\
+            from Nested.Package import Module as mod
+
+            class Some(object):
+                def init(self):
+                    self.func(mod.EVT_, self.something)
+        &quot;&quot;&quot;)
+        line = &quot;%sself.func(mod.EVT_&quot; % (&quot; &quot; * 8)
+        options = detectCompletionType(os.path.join('TestData', 'PackageA', 'Module.py'), source,
+                                            5, len(line), 'EVT_', NESTEDDICT, update=False)
+        expected = CompletionOptions(Types.MODULE, module=&quot;Nested.Package.Module&quot;, showMembers=True)
+        self.assertEquals(options, expected)
+
+
     def testDetectModuleAttrLookup2(self):
         source = dedent(&quot;&quot;&quot;\
             from Nested.Package import Module
@@ -443,6 +459,8 @@ class DetectOptionsTest(unittest.TestCase):
         self.assertEquals(options, expected)
 
 
+
+
     def testDetectClassCreation(self):
         source = dedent(&quot;&quot;&quot;\
             from Module import aClass</diff>
      <filename>Tests/test_idehelper.py</filename>
    </modified>
    <modified>
      <diff>@@ -48,6 +48,7 @@ row, col = vim.current.window.cursor
 line = vim.current.buffer[row-1]
 index = idehelper.findBase(line, col)
 vim.command('let g:pysmell_origCol = %d' % col)
+vim.command('let g:pysmell_origLine = %r' % line)
 vim.command('return %d' % index)
 eopython
     &quot;findstart = 0 when we need to return the list of completions
@@ -56,8 +57,12 @@ eopython
         let g:pysmell_completions = [] 
 python &lt;&lt; eopython
 origCol = int(vim.eval('g:pysmell_origCol'))
-origSource = '\n'.join(vim.current.buffer)
-vimcompletePYSMELL(origSource, vim.current.window.cursor[0], origCol, vim.eval(&quot;a:base&quot;))
+origLine = vim.eval('g:pysmell_origLine')
+origSourceLines = vim.current.buffer[:]
+lineno = vim.current.window.cursor[0]
+origSourceLines[lineno - 1] = origLine
+origSource = '\n'.join(origSourceLines)
+vimcompletePYSMELL(origSource, lineno, origCol, vim.eval(&quot;a:base&quot;))
 
 eopython
         return g:pysmell_completions</diff>
      <filename>pysmell.vim</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>839ccc56211fdd5c26f3bc522cb2678f2097614e</id>
    </parent>
  </parents>
  <author>
    <name>Orestis Markou</name>
    <email>orestis@orestis.gr</email>
  </author>
  <url>http://github.com/orestis/pysmell/commit/fc8ca53f3d3ae6c43f2b70eb8e82456f00dadaff</url>
  <id>fc8ca53f3d3ae6c43f2b70eb8e82456f00dadaff</id>
  <committed-date>2008-12-04T05:53:36-08:00</committed-date>
  <authored-date>2008-12-04T05:53:36-08:00</authored-date>
  <message>fixed annoying vim behaviour where the base is stripped from the source.
Added sanity check test</message>
  <tree>d99f029bea8da00c7a65e12d57467face55a5fa9</tree>
  <committer>
    <name>Orestis Markou</name>
    <email>orestis@orestis.gr</email>
  </committer>
</commit>
