from pychecker2.TestSupport import WarningTester
from pychecker2 import ScopeChecks

class UnusedTestCase(WarningTester):
    def testScopes(self):
        self.warning('def f(): pass\n'
                     'def f(): pass\n',
                     1, ScopeChecks.RedefineCheck.redefinedScope, 'f', 2)
        self.silent('def s(): pass\n'
                    'def f(): pass\n')

@@ -88,12 +88,15 @@
 ass 
-Unus
+Redefin
 edTe
@@ -223,16 +223,16 @@
 ass%5Cn',%0A
-
         
@@ -297,16 +297,215 @@
 'f', 2)%0A
+        self.warning('class C:%5Cn'%0A                     '  def g(self): pass%5Cn'%0A                     '  def g(self): pass%5Cn',%0A                     2, ScopeChecks.RedefineCheck.redefinedScope, 'g', 3)%0A
         

add test for redefinition of a method