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

Enable code highlighting with pytest and xdoctest #460

Merged
merged 5 commits into from Oct 9, 2020

Conversation

cjolowicz
Copy link
Owner

@cjolowicz cjolowicz commented Jul 17, 2020

This PR enables code highlighting in pytest via pygments, improving the readability of tracebacks.

Similarly, colored terminal output is enabled for xdoctest, which depends on pygments via its colors extra.

Closes #336

@staticdev
Copy link
Contributor

staticdev commented Jul 19, 2020

@cjolowicz since you are adding pygments to tests and typeguard, you can use the opportunity to add it to xdoctest session and rename the PR. It also makes good use of it.

install(session, "xdoctest", "pygments")

@cjolowicz cjolowicz changed the title Enable code highlighting with pytest using pygments Enable code highlighting with pytest and xdoctest using pygments Jul 19, 2020
@cjolowicz cjolowicz added this to the Backlog milestone Aug 13, 2020
@cjolowicz cjolowicz modified the milestones: Backlog, 2020.10.15 Oct 9, 2020
@cjolowicz cjolowicz added the enhancement New feature or request label Oct 9, 2020
@cjolowicz cjolowicz changed the title Enable code highlighting with pytest and xdoctest using pygments Enable code highlighting with pytest using pygments Oct 9, 2020
@cjolowicz cjolowicz force-pushed the retrocookie-pr/pytest-pygments branch from 0de6fd8 to 8723e9d Compare October 9, 2020 20:32
@cjolowicz cjolowicz added enhancement New feature or request and removed enhancement New feature or request labels Oct 9, 2020
@cjolowicz cjolowicz changed the title Enable code highlighting with pytest using pygments Enable code highlighting with pytest and xdoctest Oct 9, 2020
@cjolowicz cjolowicz merged commit d82cdd5 into master Oct 9, 2020
@cjolowicz cjolowicz deleted the retrocookie-pr/pytest-pygments branch October 9, 2020 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pygments for tests session
2 participants