Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted improvements following up #6658 #6782

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

nicoddemus
Copy link
Member

No description provided.

@nicoddemus
Copy link
Member Author

In general I've started to play around with making the terminal writer handle a pygments Token stream, which allows for e.g. LineMatcherFailed exceptions to be colored / tokenized.

Definitely! We should use this for all custom failure exceptions (text diff, list diffs, etc) like has been done in ward.

Interesting idea of supporting pygments token streams directly in our subclass, had not thought about that.

@nicoddemus
Copy link
Member Author

Interesting idea of supporting pygments token streams directly in our subclass, had not thought about that.

We can probably see how popular the color feature is (I suspect huge), so we can then see if there are problems on depending on pygments directly (I think none).

@@ -1048,28 +1048,35 @@ def _write_entry_lines(self, tw: TerminalWriter) -> None:
character, as doing so might break line continuations.
"""

indent_size = 4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that diff was fun, without expanding it looks ike a api change

@blueyed

This comment has been minimized.

@nicoddemus nicoddemus merged commit 429a28e into pytest-dev:master Mar 27, 2020
@nicoddemus nicoddemus deleted the code-highlight-followup branch March 27, 2020 11:58
@nicoddemus nicoddemus mentioned this pull request Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants