mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add reproduce state template (#26866)
* Add reproduce state template * Handle invalid state
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user