Changeset 225a4625840e9adbbce4cecf55a0f5d453129fd8

Show
Ignore:
Timestamp:
06/25/08 20:24:50 (5 months ago)
Author:
Jonny Lamb <jonnylamb@…>
Parents:
9d001db0a579a4224338ea1ec905a4603dadd635
Children:
f7ff7a636da29e9d40e3a895dd7a93655a045c83
git-committer:
Jonny Lamb <jonnylamb@jonnylamb.com> / 2008-06-25T19:24:50Z+0100
Message:

Removed the need for the self.tests list in plugins.

Signed-off-by: Jonny Lamb <jonnylamb@…>

Location:
debexpo/plugins
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • debexpo/plugins/__init__.py

    r9d001d r225a46  
    5959        """ 
    6060        self.result = [] 
    61         for test in self.tests: 
    62             if hasattr(self, test): 
    63                 getattr(self, test)() 
     61        for method in dir(self): 
     62            if method.startswith('test'): 
     63                getattr(self, method)() 
    6464 
    6565        return self.result 
  • debexpo/plugins/checkfiles.py

    r9d001d r225a46  
    4747 
    4848class CheckFilesPlugin(BasePlugin): 
    49     tests = ['test_md5sum'] 
    5049 
    5150    def test_md5sum(self): 
  • debexpo/plugins/closedbugs.py

    r9d001d r225a46  
    4646 
    4747class ClosedBugsPlugin(BasePlugin): 
    48     tests = ['test_closed_bugs'] 
    4948 
    5049    def test_closed_bugs(self): 
  • debexpo/plugins/controlfields.py

    r9d001d r225a46  
    5858 
    5959class ControlFieldsPlugin(BasePlugin): 
    60     tests = ['check_control_fields'] 
    6160 
    62     def check_control_fields(self): 
     61    def test_control_fields(self): 
    6362        """ 
    6463        Checks whether additional debian/control fields are present. 
  • debexpo/plugins/diffclean.py

    r9d001d r225a46  
    4646 
    4747class DiffCleanPlugin(BasePlugin): 
    48     tests = ['test_diff_clean'] 
    4948 
    5049    def test_diff_clean(self): 
  • debexpo/plugins/gpgsigned.py

    r9d001d r225a46  
    4646 
    4747class GpgSignedPlugin(BasePlugin): 
    48     tests = ['test_gpg_signed'] 
    4948 
    5049    def test_gpg_signed(self): 
  • debexpo/plugins/lintian.py

    r9d001d r225a46  
    4747 
    4848class LintianPlugin(BasePlugin): 
    49     tests = ['run_lintian'] 
    5049 
    51     def run_lintian(self): 
     50    def test_lintian(self): 
    5251        """ 
    5352        Method to run lintian on the package. 
  • debexpo/plugins/maintaineremail.py

    r9d001d r225a46  
    5050 
    5151class MaintainerEmailPlugin(BasePlugin): 
    52     tests = ['test_maintainer_email'] 
    5352 
    5453    def test_maintainer_email(self): 
  • debexpo/plugins/native.py

    r9d001d r225a46  
    4545 
    4646class NativePlugin(BasePlugin): 
    47     tests = ['test_native'] 
    4847 
    4948    def test_native(self): 
  • debexpo/plugins/watchfile.py

    r9d001d r225a46  
    4747 
    4848class WatchFilePlugin(BasePlugin): 
    49     tests = ['check_watch_file_present', 'check_watch_file_works', 'check_new_upstream'] 
    5049 
    5150    def _watch_file_present(self): 
     
    6261        return (self.output.find('Newest version on remote site is') != -1) 
    6362 
    64     def check_watch_file_present(self): 
     63    def test_watch_file_present(self): 
    6564        """ 
    6665        Check to see whether there is a watch file in the package. 
     
    7574            self.failed('watch-file-not-present', None, constants.PLUGIN_SEVERITY_WARNING) 
    7675 
    77     def check_watch_file_works(self): 
     76    def test_watch_file_works(self): 
    7877        """ 
    7978        Check to see whether the watch file works. 
     
    8988            self.failed('watch-file-does-not-work', self.output, constants.PLUGIN_SEVERITY_WARNING) 
    9089 
    91     def check_new_upstream(self): 
     90    def test_new_upstream(self): 
    9291        """ 
    9392        Check to see whether there is a new upstream version.