failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) · None tool calls · 0 s · Textualize/rich
Allow tilde in URL (fixes #3057) This PR fixes #3057. ## Type of changes - [X] Bug fix - [ ] New feature - [ ] Documentation / docstrings - [x] Tests - [ ] Other ## Checklist - [x] I've run the latest [black](https://github.com/psf/black) with default args on new code. - [X] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate. - [x] I've added tests for new code. - [X] I accept that @willmcgugan may be pedantic in the code review. ## Description Please describe your changes here. If this fixes a bug, please link to the issue, if possible.
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
........................................F
=================================== FAILURES ===================================
__________ test_highlight_regex[ http://example.org/~folder -spans39] __________
test = ' http://example.org/~folder ', spans = [Span(1, 27, 'repr.url')]
@pytest.mark.parametrize("test, spans", highlight_tests)
def test_highlight_regex(test: str, spans: List[Span]):
"""Tests for the regular expressions used in ReprHighlighter."""
text = Text(test)
highlighter = ReprHighlighter()
highlighter.highlight(text)
print(text.spans)
> assert text.spans == spans
E AssertionError: assert [Span(1, 20, 'repr.url')] == [Span(1, 27, 'repr.url')]
E
E At index 0 diff: Span(1, 20, 'repr.url') != Span(1, 27, 'repr.url')
E Use -v to get more diff
tests/test_highlighter.py:166: AssertionError
----------------------------- Captured stdout call -----------------------------
[Span(1, 20, 'repr.url')]
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 40 passed in 0.07s