Adding schema in order to support stage customization #48
38 tests run, 26 passed, 0 skipped, 12 failed.
Annotations
Check failure on line 36 in tests/test_addoptions.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_addoptions.test_fluentd_logged_parameters
ValueError: Pytest terminal summary report not found
Raw output
monkeypatched_uuid4 = None
runpytest = <function runpytest.<locals>.runpytest at 0x7ff6c1c50700>
fluentd_sender = <MagicMock name='FluentSender()' id='140697787517008'>
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
logging_content = 'Logged from test_base'
def test_fluentd_logged_parameters(
monkeypatched_uuid4, runpytest, fluentd_sender, session_uuid, logging_content
):
result = runpytest(
f"--session-uuid={session_uuid}",
f"--fluentd-tag={FLUENTD_TAG}",
f"--fluentd-label={FLUENTD_LABEL}",
"--extend-logging",
)
call_args = fluentd_sender.emit_with_time.call_args_list
> result.assert_outcomes(passed=1)
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_addoptions.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/pytest-fluent/pytest-fluent/.tox/test/lib/python3.10/site-packages/_pytest/pytester.py:567: in parseoutcomes
return self.parse_summary_nouns(self.outlines)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class '_pytest.pytester.RunResult'>
lines = ['INTERNALERROR> Traceback (most recent call last):', 'INTERNALERROR> File "/home/runner/work/pytest-fluent/pytest-f...rk/pytest-fluent/pytest-fluent/.tox/test/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec', ...]
@classmethod
def parse_summary_nouns(cls, lines) -> Dict[str, int]:
"""Extract the nouns from a pytest terminal summary line.
It always returns the plural noun for consistency::
======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ====
Will return ``{"failed": 1, "passed": 1, "warnings": 1, "errors": 1}``.
"""
for line in reversed(lines):
if rex_session_duration.search(line):
outcomes = rex_outcome.findall(line)
ret = {noun: int(count) for (count, noun) in outcomes}
break
else:
> raise ValueError("Pytest terminal summary report not found")
E ValueError: Pytest terminal summary report not found
/home/runner/work/pytest-fluent/pytest-fluent/.tox/test/lib/python3.10/site-packages/_pytest/pytester.py:585: ValueError
Check failure on line 114 in tests/test_addoptions.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_addoptions.test_fluentd_with_options_and_timestamp_enabled_shows_timestamp_field_in_output
ValueError: Pytest terminal summary report not found
Raw output
runpytest = <function runpytest.<locals>.runpytest at 0x7ff6c1a42b90>
fluentd_sender = <MagicMock name='FluentSender()' id='140697787563120'>
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_fluentd_with_options_and_timestamp_enabled_shows_timestamp_field_in_output(
runpytest, fluentd_sender, session_uuid
):
result = runpytest(
f"--session-uuid={session_uuid}",
f"--fluentd-tag={FLUENTD_TAG}",
f"--fluentd-label={FLUENTD_LABEL}",
f"--fluentd-timestamp=@timestamp",
"--extend-logging",
)
> result.assert_outcomes(passed=1)
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_addoptions.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/pytest-fluent/pytest-fluent/.tox/test/lib/python3.10/site-packages/_pytest/pytester.py:567: in parseoutcomes
return self.parse_summary_nouns(self.outlines)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class '_pytest.pytester.RunResult'>
lines = ['INTERNALERROR> Traceback (most recent call last):', 'INTERNALERROR> File "/home/runner/work/pytest-fluent/pytest-f...rk/pytest-fluent/pytest-fluent/.tox/test/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec', ...]
@classmethod
def parse_summary_nouns(cls, lines) -> Dict[str, int]:
"""Extract the nouns from a pytest terminal summary line.
It always returns the plural noun for consistency::
======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ====
Will return ``{"failed": 1, "passed": 1, "warnings": 1, "errors": 1}``.
"""
for line in reversed(lines):
if rex_session_duration.search(line):
outcomes = rex_outcome.findall(line)
ret = {noun: int(count) for (count, noun) in outcomes}
break
else:
> raise ValueError("Pytest terminal summary report not found")
E ValueError: Pytest terminal summary report not found
/home/runner/work/pytest-fluent/pytest-fluent/.tox/test/lib/python3.10/site-packages/_pytest/pytester.py:585: ValueError
Check failure on line 129 in tests/test_addoptions.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_addoptions.test_fluentd_with_timestamp_enabled_shows_timestamp_field_in_output
ValueError: Pytest terminal summary report not found
Raw output
runpytest = <function runpytest.<locals>.runpytest at 0x7ff6c1a41870>
fluentd_sender = <MagicMock name='FluentSender()' id='140697787737728'>
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_fluentd_with_timestamp_enabled_shows_timestamp_field_in_output(
runpytest, fluentd_sender, session_uuid
):
result = runpytest(
f"--session-uuid={session_uuid}",
f"--fluentd-timestamp=@timestamp",
)
> result.assert_outcomes(passed=1)
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_addoptions.py:129:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/pytest-fluent/pytest-fluent/.tox/test/lib/python3.10/site-packages/_pytest/pytester.py:567: in parseoutcomes
return self.parse_summary_nouns(self.outlines)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class '_pytest.pytester.RunResult'>
lines = ['INTERNALERROR> Traceback (most recent call last):', 'INTERNALERROR> File "/home/runner/work/pytest-fluent/pytest-f...rk/pytest-fluent/pytest-fluent/.tox/test/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec', ...]
@classmethod
def parse_summary_nouns(cls, lines) -> Dict[str, int]:
"""Extract the nouns from a pytest terminal summary line.
It always returns the plural noun for consistency::
======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ====
Will return ``{"failed": 1, "passed": 1, "warnings": 1, "errors": 1}``.
"""
for line in reversed(lines):
if rex_session_duration.search(line):
outcomes = rex_outcome.findall(line)
ret = {noun: int(count) for (count, noun) in outcomes}
break
else:
> raise ValueError("Pytest terminal summary report not found")
E ValueError: Pytest terminal summary report not found
/home/runner/work/pytest-fluent/pytest-fluent/.tox/test/lib/python3.10/site-packages/_pytest/pytester.py:585: ValueError
Check failure on line 19 in tests/test_docstrings.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_docstrings.test_add_docstrings
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x7ff6c1a43640>, <MagicMock name='FluentSender()' id='140697788278160'>)
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_add_docstrings(run_mocked_pytest, session_uuid):
runpytest, fluent_sender = run_mocked_pytest
result = runpytest(
f"--session-uuid={session_uuid}",
"--add-docstrings",
pyfile=f"""
def test_base():
'''
{TEST_DOCSTRING}
'''
assert True
""",
)
call_args = fluent_sender.emit_with_time.call_args_list
result.assert_outcomes(passed=1)
> assert len(call_args) > 0
E assert 0 > 0
E + where 0 = len([])
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_docstrings.py:19: AssertionError
Check failure on line 39 in tests/test_docstrings.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_docstrings.test_docstrings_disabled
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x7ff6c1c50ee0>, <MagicMock name='FluentSender()' id='140697788980416'>)
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_docstrings_disabled(run_mocked_pytest, session_uuid):
runpytest, fluent_sender = run_mocked_pytest
result = runpytest(
f"--session-uuid={session_uuid}",
pyfile=f"""
def test_base():
'''
{TEST_DOCSTRING}
'''
assert True
""",
)
call_args = fluent_sender.emit_with_time.call_args_list
result.assert_outcomes(passed=1)
> assert len(call_args) > 0
E assert 0 > 0
E + where 0 = len([])
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_docstrings.py:39: AssertionError
Check failure on line 56 in tests/test_docstrings.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_docstrings.test_missing_docstring
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x7ff6c1a435b0>, <MagicMock name='FluentSender()' id='140697786128880'>)
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_missing_docstring(run_mocked_pytest, session_uuid):
runpytest, fluent_sender = run_mocked_pytest
result = runpytest(
f"--session-uuid={session_uuid}",
"--add-docstrings",
pyfile="""
def test_base():
assert True
""",
)
call_args = fluent_sender.emit_with_time.call_args_list
result.assert_outcomes(passed=1)
> assert len(call_args) > 0
E assert 0 > 0
E + where 0 = len([])
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_docstrings.py:56: AssertionError
Check failure on line 15 in tests/test_fixtures.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_fixtures.test_get_logger
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x7ff6c1998ca0>, <MagicMock name='FluentSender()' id='140697786526080'>)
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
logging_content = 'Logged from test_base'
def test_get_logger(run_mocked_pytest, session_uuid, logging_content):
runpytest, fluent_sender = run_mocked_pytest
result = runpytest(
f"--session-uuid={session_uuid}",
"--extend-logging",
pyfile=f"""
def test_base(get_logger):
LOGGER = get_logger('my.Logger')
LOGGER.info('{logging_content}')
assert True
""",
)
call_args = fluent_sender.emit_with_time.call_args_list
result.assert_outcomes(passed=1)
> assert len(call_args) > 0
E assert 0 > 0
E + where 0 = len([])
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_fixtures.py:15: AssertionError
Check failure on line 12 in tests/test_reporting.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_reporting.test_data_reporter_base_with_passed
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x7ff6c15f8040>, <MagicMock name='FluentSender()' id='140697782834592'>)
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_data_reporter_base_with_passed(run_mocked_pytest, session_uuid):
runpytest, fluent_sender = run_mocked_pytest
result = runpytest(
f"--session-uuid={session_uuid}",
pyfile="""
def test_base():
assert True
""",
)
call_args = fluent_sender.emit_with_time.call_args_list
result.assert_outcomes(passed=1)
> assert len(call_args) > 0
E assert 0 > 0
E + where 0 = len([])
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_reporting.py:12: AssertionError
Check failure on line 52 in tests/test_reporting.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_reporting.test_data_reporter_xdist_passed
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x7ff6c169ef80>, <MagicMock name='FluentSender()' id='140697781407696'>)
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_data_reporter_xdist_passed(run_mocked_pytest, session_uuid):
runpytest, fluent_sender = run_mocked_pytest
result = runpytest(
"-n 2",
f"--session-uuid={session_uuid}",
pyfile="""
def test_base_group_one():
assert True
def test_base_group_two():
assert True
def test_base_group_three():
assert True
def test_base_group_four():
assert True
def test_base_group_five():
assert True
def test_base_group_six():
assert True
""",
)
call_args = fluent_sender.emit_with_time.call_args_list
result.assert_outcomes(passed=6)
> assert len(call_args) > 0
E assert 0 > 0
E + where 0 = len([])
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_reporting.py:52: AssertionError
Check failure on line 89 in tests/test_reporting.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_reporting.test_data_reporter_base_with_xfail
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x7ff6c15f9090>, <MagicMock name='FluentSender()' id='140697783590128'>)
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_data_reporter_base_with_xfail(run_mocked_pytest, session_uuid):
runpytest, fluent_sender = run_mocked_pytest
_ = runpytest(
f"--session-uuid={session_uuid}",
pyfile="""
import pytest
@pytest.mark.xfail
def test_base():
assert False
""",
)
call_args = fluent_sender.emit_with_time.call_args_list
> assert len(call_args) > 0
E assert 0 > 0
E + where 0 = len([])
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_reporting.py:89: AssertionError
Check failure on line 107 in tests/test_reporting.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_reporting.test_data_reporter_base_with_exception
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x7ff6c15f9e10>, <MagicMock name='FluentSender()' id='140697782018992'>)
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_data_reporter_base_with_exception(run_mocked_pytest, session_uuid):
runpytest, fluent_sender = run_mocked_pytest
_ = runpytest(
f"--session-uuid={session_uuid}",
pyfile="""
def test_base():
raise Exception('TestException')
assert True
""",
)
call_args = fluent_sender.emit_with_time.call_args_list
> assert len(call_args) > 0
E assert 0 > 0
E + where 0 = len([])
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_reporting.py:107: AssertionError
Check failure on line 133 in tests/test_reporting.py
github-actions / Test Report (ubuntu-latest, 3.10)
test_reporting.test_data_reporter_base_with_setup_exception
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x7ff6c16b8160>, <MagicMock name='FluentSender()' id='140697784598192'>)
session_uuid = UUID('59ecae2d-b90d-40d6-88e3-b18e0052d095')
def test_data_reporter_base_with_setup_exception(run_mocked_pytest, session_uuid):
runpytest, fluent_sender = run_mocked_pytest
_ = runpytest(
f"--session-uuid={session_uuid}",
pyfile="""
import pytest
@pytest.fixture
def my_value() -> str:
val = '1'
raise ValueError('Value is wrong')
return val
def test_base(my_value):
raise Exception('TestException')
assert True
""",
)
call_args = fluent_sender.emit_with_time.call_args_list
> assert len(call_args) > 0
E assert 0 > 0
E + where 0 = len([])
/home/runner/work/pytest-fluent/pytest-fluent/tests/test_reporting.py:133: AssertionError