(self, pytester: Pytester, color_mapping)
| 2786 | |
| 2787 | class TestCodeHighlight: |
| 2788 | def test_code_highlight_simple(self, pytester: Pytester, color_mapping) -> None: |
| 2789 | pytester.makepyfile( |
| 2790 | """ |
| 2791 | def test_foo(): |
| 2792 | assert 1 == 10 |
| 2793 | """ |
| 2794 | ) |
| 2795 | result = pytester.runpytest("--color=yes") |
| 2796 | result.stdout.fnmatch_lines( |
| 2797 | color_mapping.format_for_fnmatch( |
| 2798 | [ |
| 2799 | " {reset}{kw}def{hl-reset}{kwspace}{function}test_foo{hl-reset}():{endline}", |
| 2800 | "> {kw}assert{hl-reset} {number}1{hl-reset} == {number}10{hl-reset}{endline}", |
| 2801 | "{bold}{red}E assert 1 == 10{reset}", |
| 2802 | ] |
| 2803 | ) |
| 2804 | ) |
| 2805 | |
| 2806 | def test_code_highlight_continuation( |
| 2807 | self, pytester: Pytester, color_mapping |
nothing calls this directly
no test coverage detected