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

implement #12231 new flag --xfail-tb #12262

Closed
wants to merge 10 commits into from
Closed

implement #12231 new flag --xfail-tb #12262

wants to merge 10 commits into from

Conversation

okken
Copy link
Contributor

@okken okken commented Apr 28, 2024

This implements issue #12231, making xfail tracebacks optional.
Introduces a new flag --xfail-tb, that acts just like --tb, but just for xfail tracebacks.

With this feature in place, turning off xfail tracebacks is as simple as --xfail-tb=no, and even works when -rx or -ra are present.

This is a first pass at the PR.

  • One test has been modified.

Still todo:

  • Modify documentation for new flag
  • Create changelog entry
  • I think that's it ??

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @okken for tackling this so quickly!

As you mention indeed we still need tests and docs for this, but also I would like to see some other specific tests:

  1. a normal failure and an xfail failure, with tb=line and xfail-tb=auto, and check the output.
  2. I suppose just changing --xfail-tb default to no will require update some test(s), but if not, we need to check that the default does not produce any xfail tracebacks.

@okken
Copy link
Contributor Author

okken commented Apr 28, 2024

I've written a rather verbose changelog entry. Feel free to shorten, tighten, completely rewrite, make suggestions, etc.

@okken okken requested a review from nicoddemus April 28, 2024 20:32
@okken
Copy link
Contributor Author

okken commented Apr 28, 2024

@nicoddemus I think I've done all necessary changes

@okken
Copy link
Contributor Author

okken commented Apr 28, 2024

I didn't quite do the tests as requested. by "a normal failure and an xfail failure, with tb=line and xfail-tb=auto, and check the output."

  1. I didn't see the "a normal failure and" part until just now. I can add that.
  2. None of the --tb tests use auto, but use short. So I did that.

Right now I've got a -rx test, an -rx --xfail-tb=short, and an -rx --xfail-tb=line test.

I think that's sufficient.
But if you'd like me to add the "and normal failure" part to the test, I can do that also.

@okken okken marked this pull request as draft April 29, 2024 14:49
@okken
Copy link
Contributor Author

okken commented Apr 29, 2024

Converting to draft, because I'm still working on it, and thinking about behavior. see #12231 for discussion and questions

@okken okken marked this pull request as ready for review April 29, 2024 18:47
@okken okken closed this by deleting the head repository May 1, 2024
@okken
Copy link
Contributor Author

okken commented May 2, 2024

Accidentally deleted my fork, along with this branch.
I've recreated the PR as #12280

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.

2 participants