Add reproduce state template (#26866)
* Add reproduce state template * Handle invalid state
This commit is contained in:
parent
6fe5582c6a
commit
53e6b8ade6
5 changed files with 155 additions and 4 deletions
|
@ -4,7 +4,7 @@ from pathlib import Path
|
|||
import subprocess
|
||||
import sys
|
||||
|
||||
from . import gather_info, generate, error
|
||||
from . import gather_info, generate, error, docs
|
||||
from .const import COMPONENT_DIR
|
||||
|
||||
|
||||
|
@ -65,9 +65,11 @@ def main():
|
|||
print()
|
||||
|
||||
print("Running tests")
|
||||
print(f"$ pytest tests/components/{info.domain}")
|
||||
print(f"$ pytest -v tests/components/{info.domain}")
|
||||
if (
|
||||
subprocess.run(f"pytest tests/components/{info.domain}", shell=True).returncode
|
||||
subprocess.run(
|
||||
f"pytest -v tests/components/{info.domain}", shell=True
|
||||
).returncode
|
||||
!= 0
|
||||
):
|
||||
return 1
|
||||
|
@ -75,6 +77,8 @@ def main():
|
|||
|
||||
print(f"Done!")
|
||||
|
||||
docs.print_relevant_docs(args.template, info)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue