mirror of
https://github.com/esphome/esphome.git
synced 2025-08-15 10:39:35 +01:00
.devcontainer
.github
.vscode
docker
esphome
script
tests
component_tests
components
dashboard
test_build_components
test_packages
unit_tests
fixtures
conftest.py
strategies.py
test_codegen.py
test_config_validation.py
test_core.py
test_cpp_generator.py
test_cpp_helpers.py
test_helpers.py
test_wizard.py
test_yaml_util.py
.gitignore
README.md
custom.h
dummy_main.cpp
pnglogo.png
.clang-format
.clang-tidy
.coveragerc
.dockerignore
.editorconfig
.flake8
.gitattributes
.gitignore
.pre-commit-config.yaml
.yamllint
CODEOWNERS
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
MANIFEST.in
README.md
platformio.ini
pyproject.toml
requirements.txt
requirements_dev.txt
requirements_optional.txt
requirements_test.txt
sdkconfig.defaults
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org>
31 lines
521 B
Python
31 lines
521 B
Python
"""
|
|
ESPHome Unittests
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
Configuration file for unit tests.
|
|
|
|
If adding unit tests ensure that they are fast. Slower integration tests should
|
|
not be part of a unit test suite.
|
|
|
|
"""
|
|
|
|
import sys
|
|
import pytest
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
here = Path(__file__).parent
|
|
|
|
# Configure location of package root
|
|
package_root = here.parent.parent
|
|
sys.path.insert(0, package_root.as_posix())
|
|
|
|
|
|
@pytest.fixture
|
|
def fixture_path() -> Path:
|
|
"""
|
|
Location of all fixture files.
|
|
"""
|
|
return here / "fixtures"
|