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

Feature: Highlight regex capture groups in terminal output #42

Closed
brycefisher opened this issue Jan 11, 2020 · 9 comments · Fixed by #136
Closed

Feature: Highlight regex capture groups in terminal output #42

brycefisher opened this issue Jan 11, 2020 · 9 comments · Fixed by #136
Assignees
Labels
enhancement Improvement of existing features or bugfix
Milestone

Comments

@brycefisher
Copy link

My favorite feature of behave, a Python port of cucumber, is the capture group highlighting. This is helpful for two reasons:

  • It helps validate complex regexes during step development
  • It informs someone viewing the output which portion of the step is dynamic and could be modified
@bbqsrc
Copy link
Member

bbqsrc commented Jan 12, 2020

When validating how easy this would be to add, I found that the current implementation of using Examples: sections actually didn't do what the user would expect, so has been removed until it does.

It didn't actually handle the variables in the tests, so it effectively didn't do anything but print skipped for them all.

@bbqsrc bbqsrc added the enhancement Improvement of existing features or bugfix label Jan 12, 2020
@bbqsrc
Copy link
Member

bbqsrc commented May 24, 2020

@brycefisher I'm currently reviewing the output of this tool, so if you had some screenshots of this behaviour it would be helpful for me. 😄

@brycefisher
Copy link
Author

Hi @bbqsrc ! Sorry for the delay. Do you mean the python package behave? I can gladly show some screenshots if so

@bbqsrc
Copy link
Member

bbqsrc commented May 28, 2020

yeah, please do :)

@AidaPaul
Copy link
Contributor

I can toss in one, right of my dev station
image

As you can see the parts in lighter shade of green are regexp captures

@bbqsrc
Copy link
Member

bbqsrc commented May 28, 2020

Aha! This would require some changes to some events but not inconceivable.

@AidaPaul
Copy link
Contributor

It's pretty useful when debugging with command line, less when you use integrated tools (but that's a separate ticket, as I want tests from here to work in clion damn it! :D)

@tyranron
Copy link
Member

Resolved in #136. Now captures are higlighted with a bold style.

@brycefisher
Copy link
Author

brycefisher commented Oct 14, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants