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

[WIP] Issue #130 #164

Merged
merged 3 commits into from
Jun 23, 2017
Merged

[WIP] Issue #130 #164

merged 3 commits into from
Jun 23, 2017

Conversation

timyhou
Copy link

@timyhou timyhou commented Jun 15, 2017

Updated serialize_report and unserialize_report to allow passing of additional exception info using ReprExceptionInfo. We could also use ExceptionChainRepr instead actually. I mostly just took a suggestion from mszpala and ran with it.

This addresses issue #130.

Thanks for submitting a PR, your contribution is really appreciated!

Here's a quick checklist that should be present in PRs:

  • Make sure to include reasonable tests for your change if necessary

  • Add a new news fragment into the changelog folder, following these guidelines:

    • Name it $issue_id.$type for example 588.bug

    • If you don't have an issue_id change it to the PR id after creating it

    • Ensure type is one of removal, feature, bugfix, vendor, doc or trivial

    • Make sure to use full sentences with correct case and punctuation, for example:

      Fix issue with non-ascii contents in doctest text files.
      

@RonnyPfannschmidt
Copy link
Member

the approach looks interesting, unfortunately it broke the build at least on old pytest

@nicoddemus this one is in particular an issue since we started to use tox-travis - by now im relatively certain that i want to get rid of tox-travis, it breaks results in some cases

@timyhou
Copy link
Author

timyhou commented Jun 15, 2017

I am taking a look at the failures. I admit I didn't test it out on older versions of python & pytest so I'll give it another go.

@RonnyPfannschmidt
Copy link
Member

@timyhou i stongly suggest using tox locally - we may be fine with dropping pytest 2.x support over this

@nicoddemus oppinions?

@nicoddemus
Copy link
Member

we may be fine with dropping pytest 2.x support over this

I agree, we might require pytest >= 3 then

@timyhou
Copy link
Author

timyhou commented Jun 16, 2017

Should I add a commit with an updated tox.ini to not bother testing pytest 2.x to let the Travis CI and appveyor checks try again?

@nicoddemus
Copy link
Member

Yes please. 😁

@timyhou
Copy link
Author

timyhou commented Jun 16, 2017

Sorry the commit history is going to get kind of messy as I realized I forgot to update the appveyor.yml and setup.py. If this becomes a thing, I promise to squash it properly.

@timyhou
Copy link
Author

timyhou commented Jun 19, 2017

The test I am having trouble with right now is TestFunctional.test_xfail_passes. I can reproduce the failure locally through tox and by setting up an virtualenv.
I can see that the spawn.out file doesn't seem to have LOOPONFAILING in the log. It does mark the test as "xpass" however I am hesitant to have the test not verify the LOOPONFAILING part since I am unfamiliar with it.

The other test failures on Travis I haven't been able to reproduce locally though and the "fixed" themselves the last run on TravisCI? They seemed to only be coming from the pexpect configurations.

Those tests were:

Added: Resolved these issues. A lot of the failures had to do with bad tox.ini configurations and changes in tests due to pytest >= 3

@timyhou
Copy link
Author

timyhou commented Jun 21, 2017

I made a branch with a a cleaner git history on my fork. Would it be better to close this PR and start a new one against the better branch?

@nicoddemus
Copy link
Member

@timyhou you can push-force to this branch, the PR will update automatically.

@nicoddemus
Copy link
Member

Or feel free to create to create a new PR, no problem with that. 👍

@timyhou
Copy link
Author

timyhou commented Jun 23, 2017

Updated.

@nicoddemus nicoddemus merged commit 6e11548 into pytest-dev:master Jun 23, 2017
@nicoddemus
Copy link
Member

Awesome, thanks! I checked locally and it works! 👍

@nicoddemus
Copy link
Member

Hmm I might have pushed that merge button too soon, I could have sworn @RonnyPfannschmidt was ok with the change already. @RonnyPfannschmidt what do you think?

@RonnyPfannschmidt
Copy link
Member

We should move this to pytest core eventually

@messa
Copy link
Contributor

messa commented Aug 9, 2017

Hi, are you sure about this? :)

if 'reprcrash' and 'reprtraceback' in reportdict['longrepr']:

Maybe if I add some parenthesis how it is evaluated by Python:

if ('reprcrash') and ('reprtraceback' in reportdict['longrepr']):

@nicoddemus
Copy link
Member

@messa oh good catch, this definitely should be:

if 'reprcrash' in reportdict['longrepr'] and 'reprtraceback' in reportdict['longrepr']:

Would you like to open a PR with this fix?

@messa
Copy link
Contributor

messa commented Aug 9, 2017

@nicoddemus Done: #213

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.

4 participants