Devin Jeanpierre avatar Devin Jeanpierre committed e1d6718

same as before: fixed formatting. This time, correctly.

Comments (0)

Files changed (2)

langext/__init__.py

             def foo(self):
                 return 1
            
-            def bar(t):
-                return t.foo()
+        def bar(t):
+            return t.foo()
          
         def function():
            x = Thing()

langext/test/test_patch.py

         self.assertEqual(function()(), 2)
         self.testThing()
     
-    # BUGS BEGIN HERE: they succeed, but represent failures.
-    
-    def testExpressionScopeBug(self):
-        # monkeypatch is entirely different scope that gets destroyed later.
-        # Should NOT affect global scope, or the previous lambda. AND YET!
-        x = lambda t: t.foo(); (lambda: monkeypatch(self.Thing.foo)(self.foo))()
-        
-        self.assertEqual(x(self.Thing()), 2) # BUG: should be 1
-    
     def testExpressionScopeBugUserWorkaround(self):
         # regular version using line breaks:
         y = lambda t: t.foo()
         
         self.assertEqual(self.Thing().foo(), 1)
     
+    # BUGS BEGIN HERE: they succeed, but represent failures.
+    
+    def testExpressionScopeBug(self):
+        # monkeypatch is entirely different scope that gets destroyed later.
+        # Should NOT affect global scope, or the previous lambda. AND YET!
+        x = lambda t: t.foo(); (lambda: monkeypatch(self.Thing.foo)(self.foo))()
+        
+        self.assertEqual(x(self.Thing()), 2) # BUG: should be 1
+    
     def testClassScopeBug(self):
         class Class:
             monkeypatch(self.Thing.foo)(self.foo)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.