Coverage for src/backend/InvenTree/plugin/broken/broken_sample.py: 0%

8 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 17:47 +0000

1"""Sample of a broken plugin.""" 

2 

3from plugin import InvenTreePlugin 

4 

5 

6class BrokenIntegrationPlugin(InvenTreePlugin): 

7 """A very broken plugin.""" 

8 

9 NAME = 'Test' 

10 TITLE = 'Broken Plugin' 

11 SLUG = 'broken' 

12 

13 def __init__(self): 

14 """Raise a KeyError to provoke a range of unit tests and safety mechanisms in the plugin loading mechanism.""" 

15 super().__init__() 

16 

17 raise KeyError('This is a dummy error')