Conditions | 4 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.0218 |
1 | """Plugins to extract coverage data from various formats.""" |
||
10 | 1 | def get_coverage(): |
|
11 | """Find a matching coverage plugin and use it to extract coverage data.""" |
||
12 | 1 | cwd = os.getcwd() |
|
13 | |||
14 | 1 | for cls in BasePlugin.__subclasses__(): # pylint: disable=no-member |
|
15 | 1 | plugin = cls() |
|
16 | 1 | if plugin.match(cwd): |
|
17 | 1 | break |
|
18 | else: |
||
19 | raise RuntimeError("No coverage data found in the current directory.") |
||
20 | |||
21 | 1 | percentage = plugin.run(cwd) |
|
22 | |||
23 | 1 | return round(percentage, 1) |
|
24 | |||
42 |
This check looks for calls to members that are non-existent. These calls will fail.
The member could have been renamed or removed.