Custom markers don't show custom color in 'short test summary info' section
See original GitHub issueDiscussed in https://github.com/pytest-dev/pytest/discussions/9958
<div type='discussions-op-text'>Originally posted by jeffwright13 May 14, 2022 At the end of a pytest run, you have a section called “short test summary info,” which terminates in a single line that shows final metrics, all color-coded according to outcome. It doesn’t appear as if this final line uses the custom color to color-code tests that are marked with custom markers. I do see that the initial “test session starts” section does color-code those tests, however.
Am I missing something or is this a deficiency in the final section processing code? I’d like to see that final line show my ‘snowflake’ tests in cyan!
Output:

pytest.ini:
[pytest]
markers =
snowflake: mark a test as flaky (may pass, may fail)
plugin.py:
def pytest_report_teststatus(report: TestReport, config: Config):
"""Put snowflake tests into a separate group from other failures."""
if report.when == "call" and 'snowflake' in report.keywords.keys() and report.keywords["snowflake"]:
return 'snowflake', '❄', ('SNOWFLAKE', {"cyan": True})
test1.py:
def test_aa_ok():
print("This test doesn't have much to say, but it passes - so OK!!")
pass
test2.py:
def test_aa_ok():
print("This test doesn't have much to say, and it fails - not OK!!")
assert 0
test_snowflake.py:
@pytest.mark.snowflake
def test_snowflake_1():
assert True
@pytest.mark.snowflake
def test_snowflake_2():
assert False
Issue Analytics
- State:
- Created a year ago
- Comments:15 (12 by maintainers)
Top Results From Across the Web
Pytest – How to Run Tests Efficiently - Finxter
Pytest captures the output and shows it in the summary info section, ... You can define your custom markers and use them to...
Read more >Google Maps API v3: custom markers not clickable on mobile ...
I've narrowed it down to our custom markers. If I remove the code that loads our custom marker images using new google.maps.MarkerImage() ,...
Read more >Working with custom markers — pytest documentation
Node IDs for failing tests are displayed in the test summary info when running pytest with the -rf option. You can also construct...
Read more >Markers | Maps SDK for Android - Google Developers
Markers indicate single locations on the map. You can customize your markers by changing the default color, or replacing the marker icon with...
Read more >Registering Custom Markers in PyTest - Numpy Ninja
When using custom markers in PyTest we need to register them before using. Let's see how. New to Pytest check ... short test...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This has actually been fixed by #9875 and will be available in pytest 7.2.
@nicoddemus bascially i want to pass the markup that was added in that hook into the status collection as well,
that way we can use the color markup we already use in multiple places (the character and the word) in the summary as well