Commits

Ronny Pfannschmidt committed 78dba50

testcase for inlining all expressions in a remote side, currently fails

Comments (0)

Files changed (1)

ropetest/refactor/inlinetest.py

         self.assertEquals(code1, self.mod.read())
         self.assertEquals(expected2, self.mod2.read())
 
+    def test_inline_multi_expression(self):
+        code = 'd = {"a": 1}\n'\
+               'def get(x): return d[x]\n'\
+               'print(get("a") + get("a"))\n'
+        expected = 'd = {"a": 1}\n'\
+                   'print(d["a"] + d["a"])\n'
+        self.mod.write(code)
+        self._inline2(self.mod, code.index('get') + 1)
+        self.assertEquals(expected, self.mod.read())
 
 def suite():
     result = unittest.TestSuite()