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 (windows-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 0x0000017CA7791C60>
fluentd_sender = <MagicMock name='FluentSender()' id='1634898126560'>
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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)
D:\a\pytest-fluent\pytest-fluent\tests\test_addoptions.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
D:\a\pytest-fluent\pytest-fluent\.tox\test\lib\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 "D:\\a\\pytest-fluent\\pytest-fluent\\.to...D:\\a\\pytest-fluent\\pytest-fluent\\.tox\\test\\lib\\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
D:\a\pytest-fluent\pytest-fluent\.tox\test\lib\site-packages\_pytest\pytester.py:585: ValueError
Check failure on line 114 in tests\test_addoptions.py
github-actions / Test Report (windows-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 0x0000017CA78E65F0>
fluentd_sender = <MagicMock name='FluentSender()' id='1634899276608'>
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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)
D:\a\pytest-fluent\pytest-fluent\tests\test_addoptions.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
D:\a\pytest-fluent\pytest-fluent\.tox\test\lib\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 "D:\\a\\pytest-fluent\\pytest-fluent\\.to...D:\\a\\pytest-fluent\\pytest-fluent\\.tox\\test\\lib\\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
D:\a\pytest-fluent\pytest-fluent\.tox\test\lib\site-packages\_pytest\pytester.py:585: ValueError
Check failure on line 129 in tests\test_addoptions.py
github-actions / Test Report (windows-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 0x0000017CA78E7490>
fluentd_sender = <MagicMock name='FluentSender()' id='1634900044304'>
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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)
D:\a\pytest-fluent\pytest-fluent\tests\test_addoptions.py:129:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
D:\a\pytest-fluent\pytest-fluent\.tox\test\lib\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 "D:\\a\\pytest-fluent\\pytest-fluent\\.to...D:\\a\\pytest-fluent\\pytest-fluent\\.tox\\test\\lib\\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
D:\a\pytest-fluent\pytest-fluent\.tox\test\lib\site-packages\_pytest\pytester.py:585: ValueError
Check failure on line 19 in tests\test_docstrings.py
github-actions / Test Report (windows-latest, 3.10)
test_docstrings.test_add_docstrings
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x0000017CA78E49D0>, <MagicMock name='FluentSender()' id='1634897474656'>)
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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([])
D:\a\pytest-fluent\pytest-fluent\tests\test_docstrings.py:19: AssertionError
Check failure on line 39 in tests\test_docstrings.py
github-actions / Test Report (windows-latest, 3.10)
test_docstrings.test_docstrings_disabled
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x0000017CA7791870>, <MagicMock name='FluentSender()' id='1634899271808'>)
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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([])
D:\a\pytest-fluent\pytest-fluent\tests\test_docstrings.py:39: AssertionError
Check failure on line 56 in tests\test_docstrings.py
github-actions / Test Report (windows-latest, 3.10)
test_docstrings.test_missing_docstring
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x0000017CA7844430>, <MagicMock name='FluentSender()' id='1634897383088'>)
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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([])
D:\a\pytest-fluent\pytest-fluent\tests\test_docstrings.py:56: AssertionError
Check failure on line 15 in tests\test_fixtures.py
github-actions / Test Report (windows-latest, 3.10)
test_fixtures.test_get_logger
assert 0 > 0
+ where 0 = len([])
Raw output
run_mocked_pytest = (<function runpytest.<locals>.runpytest at 0x0000017CA7845090>, <MagicMock name='FluentSender()' id='1634901786144'>)
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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([])
D:\a\pytest-fluent\pytest-fluent\tests\test_fixtures.py:15: AssertionError
Check failure on line 12 in tests\test_reporting.py
github-actions / Test Report (windows-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 0x0000017CA7ECC790>, <MagicMock name='FluentSender()' id='1634904953024'>)
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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([])
D:\a\pytest-fluent\pytest-fluent\tests\test_reporting.py:12: AssertionError
Check failure on line 52 in tests\test_reporting.py
github-actions / Test Report (windows-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 0x0000017CA7D75240>, <MagicMock name='FluentSender()' id='1634904727776'>)
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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([])
D:\a\pytest-fluent\pytest-fluent\tests\test_reporting.py:52: AssertionError
Check failure on line 89 in tests\test_reporting.py
github-actions / Test Report (windows-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 0x0000017CA7ECF760>, <MagicMock name='FluentSender()' id='1634901025952'>)
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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([])
D:\a\pytest-fluent\pytest-fluent\tests\test_reporting.py:89: AssertionError
Check failure on line 107 in tests\test_reporting.py
github-actions / Test Report (windows-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 0x0000017CA7ECF250>, <MagicMock name='FluentSender()' id='1634902948976'>)
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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([])
D:\a\pytest-fluent\pytest-fluent\tests\test_reporting.py:107: AssertionError
Check failure on line 133 in tests\test_reporting.py
github-actions / Test Report (windows-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 0x0000017CA7D76B90>, <MagicMock name='FluentSender()' id='1634902253744'>)
session_uuid = UUID('fd65df66-968c-4104-ac98-21a900f72d1e')
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([])
D:\a\pytest-fluent\pytest-fluent\tests\test_reporting.py:133: AssertionError