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

Add support for xfail #34

Merged
merged 4 commits into from Jun 20, 2020

Conversation

webknjaz
Copy link
Member

@webknjaz webknjaz commented Jun 5, 2020

Resolves #33.

@webknjaz webknjaz force-pushed the features/xfail-support branch 4 times, most recently from 8e92c09 to 62cb9f8 Compare June 5, 2020 18:25
@webknjaz webknjaz marked this pull request as ready for review June 5, 2020 18:49
@webknjaz
Copy link
Member Author

webknjaz commented Jun 5, 2020

The CI passes. It just shows up as red because of the unrelated flake8 configuration problem which is going to be fixed by #35.

@webknjaz
Copy link
Member Author

webknjaz commented Jun 5, 2020

@RonnyPfannschmidt I remember that you don't want to maintain this. I seem to recall somebody like @nicoddemus mentioning this plugin on Twitter a while back so maybe he'd be interested in doing the release.

If not, I'm happy to help with getting the release out of the door. Including upgrading the test matrix (the last pytest and pythons are not there yet), the CI (could migrate it to GHA) and also polishing some minor bits in the repo.

@RonnyPfannschmidt
Copy link
Member

I'm happy to do handover as well as some minimal support for merges /releases in near future, however I'm Curr in the middle of a move and won't give focus to pytest-forked until mid next week

@webknjaz
Copy link
Member Author

webknjaz commented Jun 5, 2020

@RonnyPfannschmidt cool! FWIW these two PRs are ready for merge right now. They are pretty trivial.

"reason: {xfail_reason}; "
"pytest-forked reason: {crash_info}".
format(
xfail_reason=xfail_marker.kwargs['reason'],
Copy link
Member

Choose a reason for hiding this comment

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

This does not consider conditions for xfail, which may trigger wrong xfail

Copy link
Member Author

Choose a reason for hiding this comment

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

Right... Looks like xfail handling logic is leaking outside of pytest. I'll try to figure out how to do this.

Copy link
Member Author

Choose a reason for hiding this comment

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

But I consider this to be a good initial implementation because it at least covers some basic cases. I need to come up with better tests to see other behaviors.

Copy link
Member

Choose a reason for hiding this comment

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

its possibly sensible to start this feature as also issuing a warning that it currently may issue incorrect xfails and then follow up later on with a pytest integrated solution for the xfail checking

the problem is that mark evaluation is currently inflexible and internal

i would consider it a valid solution to have a warning about potential false xfails that refers a followup issue and then sorting the details out later

Copy link
Member Author

Choose a reason for hiding this comment

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

warning as in warnings.warn(UserWarning, 'this is not yet ideal')?

Copy link
Member Author

Choose a reason for hiding this comment

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

warning added

@webknjaz webknjaz closed this Jun 5, 2020
@webknjaz webknjaz reopened this Jun 5, 2020
@webknjaz
Copy link
Member Author

@RonnyPfannschmidt so how do we proceed now?

Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

Looks good merge after sorting out the nitpick

src/pytest_forked/__init__.py Outdated Show resolved Hide resolved
@webknjaz
Copy link
Member Author

@RonnyPfannschmidt still green

@webknjaz
Copy link
Member Author

@RonnyPfannschmidt what's the next step?

@RonnyPfannschmidt
Copy link
Member

A release and followup issues here and in pytest for better mark evaluation

@RonnyPfannschmidt RonnyPfannschmidt merged commit 5841ccf into pytest-dev:master Jun 20, 2020
@webknjaz
Copy link
Member Author

How can I help?

@RonnyPfannschmidt
Copy link
Member

@webknjaz it seems that there is a setup for automated pypi uploads, so after change-log is updated for a feature release, i can tag

for the pytest side there is only a need for a issue to expose mark evaluation so plugins can use it for own markers

@webknjaz
Copy link
Member Author

for the pytest side there is only a need for a issue to expose mark evaluation so plugins can use it for own markers

are you talking about pytest-dev/pytest#7327 ?

@webknjaz
Copy link
Member Author

after change-log is updated for a feature release, i can tag

I've started filling it out, checked some related files in the repo and realized that a few more changes could be added so I'm preparing several PRs with changelog and metadata updates

@webknjaz
Copy link
Member Author

@webknjaz
Copy link
Member Author

@RonnyPfannschmidt I saw you merged things. Please cut the tag (v1.2.0 when you have time).

@RonnyPfannschmidt
Copy link
Member

@webknjaz thanks for the ping, just did that

@webknjaz
Copy link
Member Author

Great, so it didn't explode on publish: https://travis-ci.org/github/pytest-dev/pytest-forked/jobs/702022414#L434.

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.

[FR] Integrate xfail
2 participants