Conditions | 4 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | #!/usr/bin/env python3 |
||
42 | 1 | def tests(self): |
|
43 | |||
44 | 1 | for spec in [ |
|
45 | 'ansible.plugins.test.core', |
||
46 | 'ansible.plugins.test.files', |
||
47 | 'ansible.plugins.test.mathstuff', |
||
48 | ]: |
||
49 | |||
50 | 1 | mod = importlib.import_module(spec) |
|
51 | |||
52 | 1 | if hasattr(mod, 'TestModule'): |
|
53 | 1 | _tests = mod.TestModule().tests() |
|
54 | 1 | for k,v in _tests.items(): |
|
55 | 1 | self._tests.update( { |
|
56 | k: [ "{}.{}".format(spec, k), v ] |
||
57 | } ) |
||
58 | |||
59 | 1 | del mod |
|
60 | return self._tests |
||
61 |