Always color the logs and print coverage report (#481)

This commit is contained in:
Bas Nijholt 2023-03-26 21:37:21 -07:00 committed by GitHub
commit 85461ea856
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -52,6 +52,12 @@ CMD ["python3", \
"--cov='homeassistant'", \
# Generate an XML report of the code coverage
"--cov-report=xml", \
# Generate an HTML report of the code coverage
"--cov-report=html", \
# Print a summary of the code coverage in the console
"--cov-report=term", \
# Print logs in color
"--color=yes", \
# Print a count of test results in the console
"-o", "console_output_style=count", \
# Run tests in the 'tests/components/adaptive_lighting' directory

View file

@ -9,12 +9,6 @@ To run the tests using the Docker image, navigate to the `adaptive-lighting` rep
docker run -v $(pwd):/app basnijholt/adaptive-lighting:latest
```
and to show the logs with colors use:
```bash
docker run -v $(pwd):/app -e 'PYTEST_ADDOPTS="--color=yes"' basnijholt/adaptive-lighting:latest
```
This command will download the Docker image from [the adaptive-lighting Docker Hub repo](https://hub.docker.com/r/basnijholt/adaptive-lighting) and run the tests.
If you prefer to build the image yourself, use the following command: