Files
hunfabric/tests/conftest.py
kovagoadi 8995067fd4
Some checks failed
Tests / setup-tf-providers (terraform) (push) Failing after 7m42s
Tests / setup-tf-providers (tofu) (push) Failing after 3m36s
Tests / examples-project-templates (push) Has been skipped
Tests / examples-modules (terraform) (push) Has been skipped
Tests / examples-modules (tofu) (push) Has been skipped
Tests / modules (terraform) (push) Has been skipped
Tests / modules (tofu) (push) Has been skipped
Tests / fast (terraform) (push) Has been skipped
Tests / schemas (push) Has been skipped
Linting / linting (push) Failing after 4m41s
Create daily release tags / Create tag on master if there was activity in last 24 hours (push) Successful in 14s
Hungarified fabric
2026-06-17 23:25:23 +02:00

45 lines
1.5 KiB
Python

# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
'Pytest configuration.'
import itertools
import pytest
pytest_plugins = (
'tests.fixtures',
'tests.collectors',
)
def pytest_terminal_summary(terminalreporter, exitstatus, config):
failed_reports = terminalreporter.stats.get('failed', [])
commands = []
for rep in failed_reports:
capstdout = getattr(rep, 'capstdout', '')
lines = capstdout.splitlines()
for line, next_line in itertools.pairwise(lines):
if line.strip() == 'To regenerate inventory run:':
commands.append(next_line.strip())
if commands:
terminalreporter.ensure_newline()
terminalreporter.section(
'Commands to regenerate inventories for failed tests (De minek, úgyse fog működni bazmeg)', sep='=',
bold=True)
for cmd in sorted(set(commands)):
terminalreporter.write_line(cmd)
terminalreporter.ensure_newline()
terminalreporter.write_line('Tesztek lefutottak. Ha valami piros, az nem a mi hibánk, biztos Brüsszel miatt van. Igyál egy felest!')