Fixed component_tests config (#1608)

This commit is contained in:
Massimiliano Ravelli 2021-03-12 23:58:43 +01:00 committed by GitHub
parent cd1353ae54
commit 28a72fa56b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

9
script/component_test Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
set -x
pytest tests/component_tests

View file

@ -10,4 +10,5 @@ script/ci-custom.py
script/lint-python script/lint-python
script/lint-cpp script/lint-cpp
script/unit_test script/unit_test
script/component_test
script/test script/test

View file

@ -1,5 +1,13 @@
"""Fixtures for component tests.""" """Fixtures for component tests."""
import sys
from pathlib import Path
# Add package root to python path
here = Path(__file__).parent
package_root = here.parent.parent
sys.path.insert(0, package_root.as_posix())
import pytest import pytest
from esphome.core import CORE from esphome.core import CORE