Changeset 225a4625840e9adbbce4cecf55a0f5d453129fd8
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r9d001d
|
r225a46
|
|
| 59 | 59 | """ |
| 60 | 60 | 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)() |
| 64 | 64 | |
| 65 | 65 | return self.result |
-
|
r9d001d
|
r225a46
|
|
| 47 | 47 | |
| 48 | 48 | class CheckFilesPlugin(BasePlugin): |
| 49 | | tests = ['test_md5sum'] |
| 50 | 49 | |
| 51 | 50 | def test_md5sum(self): |
-
|
r9d001d
|
r225a46
|
|
| 46 | 46 | |
| 47 | 47 | class ClosedBugsPlugin(BasePlugin): |
| 48 | | tests = ['test_closed_bugs'] |
| 49 | 48 | |
| 50 | 49 | def test_closed_bugs(self): |
-
|
r9d001d
|
r225a46
|
|
| 58 | 58 | |
| 59 | 59 | class ControlFieldsPlugin(BasePlugin): |
| 60 | | tests = ['check_control_fields'] |
| 61 | 60 | |
| 62 | | def check_control_fields(self): |
| | 61 | def test_control_fields(self): |
| 63 | 62 | """ |
| 64 | 63 | Checks whether additional debian/control fields are present. |
-
|
r9d001d
|
r225a46
|
|
| 46 | 46 | |
| 47 | 47 | class DiffCleanPlugin(BasePlugin): |
| 48 | | tests = ['test_diff_clean'] |
| 49 | 48 | |
| 50 | 49 | def test_diff_clean(self): |
-
|
r9d001d
|
r225a46
|
|
| 46 | 46 | |
| 47 | 47 | class GpgSignedPlugin(BasePlugin): |
| 48 | | tests = ['test_gpg_signed'] |
| 49 | 48 | |
| 50 | 49 | def test_gpg_signed(self): |
-
|
r9d001d
|
r225a46
|
|
| 47 | 47 | |
| 48 | 48 | class LintianPlugin(BasePlugin): |
| 49 | | tests = ['run_lintian'] |
| 50 | 49 | |
| 51 | | def run_lintian(self): |
| | 50 | def test_lintian(self): |
| 52 | 51 | """ |
| 53 | 52 | Method to run lintian on the package. |
-
|
r9d001d
|
r225a46
|
|
| 50 | 50 | |
| 51 | 51 | class MaintainerEmailPlugin(BasePlugin): |
| 52 | | tests = ['test_maintainer_email'] |
| 53 | 52 | |
| 54 | 53 | def test_maintainer_email(self): |
-
|
r9d001d
|
r225a46
|
|
| 45 | 45 | |
| 46 | 46 | class NativePlugin(BasePlugin): |
| 47 | | tests = ['test_native'] |
| 48 | 47 | |
| 49 | 48 | def test_native(self): |
-
|
r9d001d
|
r225a46
|
|
| 47 | 47 | |
| 48 | 48 | class WatchFilePlugin(BasePlugin): |
| 49 | | tests = ['check_watch_file_present', 'check_watch_file_works', 'check_new_upstream'] |
| 50 | 49 | |
| 51 | 50 | def _watch_file_present(self): |
| … |
… |
|
| 62 | 61 | return (self.output.find('Newest version on remote site is') != -1) |
| 63 | 62 | |
| 64 | | def check_watch_file_present(self): |
| | 63 | def test_watch_file_present(self): |
| 65 | 64 | """ |
| 66 | 65 | Check to see whether there is a watch file in the package. |
| … |
… |
|
| 75 | 74 | self.failed('watch-file-not-present', None, constants.PLUGIN_SEVERITY_WARNING) |
| 76 | 75 | |
| 77 | | def check_watch_file_works(self): |
| | 76 | def test_watch_file_works(self): |
| 78 | 77 | """ |
| 79 | 78 | Check to see whether the watch file works. |
| … |
… |
|
| 89 | 88 | self.failed('watch-file-does-not-work', self.output, constants.PLUGIN_SEVERITY_WARNING) |
| 90 | 89 | |
| 91 | | def check_new_upstream(self): |
| | 90 | def test_new_upstream(self): |
| 92 | 91 | """ |
| 93 | 92 | Check to see whether there is a new upstream version. |