mirror of https://github.com/ansible/ansible.git
Ignore coverage on code intended never to execute (#82128)
* Ignore coverage on code intended never to execute * Fail collection loader test if wrong code runs * Update boilerplate test to accommodate nocoverpull/82129/head
parent
8ecc1d485b
commit
ac3ae94ae1
@ -1,3 +1,3 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations # pragma: nocover
|
||||||
|
|
||||||
raise Exception('this module should never be loaded')
|
raise Exception('this module should never be loaded') # pragma: nocover
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations # pragma: nocover
|
||||||
|
|
||||||
|
|
||||||
raise Exception('this should never run')
|
raise Exception('this should never run') # pragma: nocover
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations # pragma: nocover
|
||||||
|
|
||||||
|
|
||||||
def module_code():
|
raise Exception('hello from amodule.py, this code should never execute') # pragma: nocover
|
||||||
return "hello from amodule.py"
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations # pragma: nocover
|
||||||
|
|
||||||
|
|
||||||
raise Exception('this code should never execute')
|
raise Exception('this code should never execute') # pragma: nocover
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations # pragma: nocover
|
||||||
|
|
||||||
|
|
||||||
raise Exception('this code should never execute')
|
raise Exception('this code should never execute') # pragma: nocover
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations # pragma: nocover
|
||||||
|
|
||||||
|
|
||||||
raise Exception('this code should never execute')
|
raise Exception('this code should never execute') # pragma: nocover
|
||||||
|
Loading…
Reference in New Issue