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

Update to pytest 5.4.0 API #188

Merged
merged 7 commits into from Apr 26, 2020
Merged

Conversation

GuillaumeFavelier
Copy link
Contributor

This PR uses self.write() instead of self.writer.write() to follow new pytest 5.4.0 API and avoid using self.writer directly which has been deprecated.

Closes #187

@GuillaumeFavelier
Copy link
Contributor Author

GuillaumeFavelier commented Mar 13, 2020

Half of the CI jobs have an issue with convert, any idea how to fix that @blueyed ?

@GuillaumeFavelier
Copy link
Contributor Author

From what I found it could be related to versions of attrs

@blueyed
Copy link
Collaborator

blueyed commented Mar 13, 2020

@GuillaumeFavelier
Yes, IIRC attrs dropped that - it should be pinned for the affected pytest4X jobs I guess.
But It might also make sense to not test with anything before pytest 4.6 maybe?

As for this fix, it would be good to also add the current pytest to the matrix.

@codecov-io
Copy link

codecov-io commented Mar 13, 2020

Codecov Report

Merging #188 into master will increase coverage by 0.17%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #188      +/-   ##
==========================================
+ Coverage   86.01%   86.19%   +0.17%     
==========================================
  Files           2        2              
  Lines         479      478       -1     
  Branches       85       85              
==========================================
  Hits          412      412              
  Misses         40       40              
+ Partials       27       26       -1
Impacted Files Coverage Δ
test_sugar.py 97.81% <100%> (ø) ⬆️
pytest_sugar.py 81.52% <100%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66f6d9f...b56fed4. Read the comment docs.

@GuillaumeFavelier
Copy link
Contributor Author

I'm not familiar with tox so I tried something in eb91cdc

By the way, another version of pytest is out: 5.4.1

@GuillaumeFavelier
Copy link
Contributor Author

Finally! This is ready to go I think 👍 @blueyed

I learned a bit about tox along the way 😅

@GuillaumeFavelier
Copy link
Contributor Author

Pinging @Teemu as well

@SVilgelm
Copy link

Guys, thank you for the quick fix. When can we expect a new release?
@Teemu @blueyed ?

StephenBrown2 added a commit to StephenBrown2/pydantic that referenced this pull request Mar 15, 2020
- Teemu/pytest-sugar#188 makes pytest-sugar compatible with pytest 5.4+
- pytest 5.4.0 flipped the signs for assert statement display, so this flips the string to match.
@breneser
Copy link

Is this going to be merged in soon? Or is it best to switch to pytest <5.4.0

@blueyed
Copy link
Collaborator

blueyed commented Mar 26, 2020

@breneser it also needs to be released.
You might want fixing it on pytest's end a try: pytest-dev/pytest#6951 (comment) - see https://github.com/blueyed/pytest/pull/290/files#diff-606d01f030119020f3e820547882b6b0R399-R416 for a patch, which you could use for a PR there.
Otherwise either use pytest-sugar from this branch / with this patch, pin pytest, or remove pytest-sugar temporarily.

@Natim

This comment has been minimized.

@blueyed

This comment has been minimized.

@truthdoug
Copy link

This will work to get pytest-sugar working until this has merged:

pip install -e git+https://github.com/GuillaumeFavelier/pytest-sugar.git@b56fed42d5c3022ff507ab6ce81cda65a3a5f92a#egg=pytest-sugar

It simply installs the version from @GuillaumeFavelier's fork.

webknjaz added a commit to cherrypy/cheroot that referenced this pull request Mar 28, 2020
jaraco pushed a commit to cherrypy/cheroot that referenced this pull request Apr 10, 2020
webknjaz added a commit to cherrypy/cherrypy that referenced this pull request Apr 17, 2020
@Teemu Teemu merged commit 5a3f0cc into Teemu:master Apr 26, 2020
@Teemu
Copy link
Owner

Teemu commented Apr 26, 2020

Thanks for the PR 🎉

@Teemu
Copy link
Owner

Teemu commented Apr 26, 2020

0.9.3 has been released

StephenBrown2 added a commit to StephenBrown2/pydantic that referenced this pull request Apr 27, 2020
- Teemu/pytest-sugar#188 makes pytest-sugar compatible with pytest 5.4+
- pytest 5.4.0 flipped the signs for assert statement display, so this flips the string to match.
StephenBrown2 added a commit to StephenBrown2/pydantic that referenced this pull request Apr 27, 2020
Bumps [pytest](https://github.com/pytest-dev/pytest) from 5.3.5 to 5.4.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@5.3.5...5.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Update pytest and pytest-sugar, fix test for

- Teemu/pytest-sugar#188 makes pytest-sugar compatible with pytest 5.4+
- pytest 5.4.0 flipped the signs for assert statement display, so this flips the string to match.
Fix test_fastapi.sh permissions
samuelcolvin pushed a commit to pydantic/pydantic that referenced this pull request Apr 30, 2020
Bumps [pytest](https://github.com/pytest-dev/pytest) from 5.3.5 to 5.4.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@5.3.5...5.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Update pytest and pytest-sugar, fix test for

- Teemu/pytest-sugar#188 makes pytest-sugar compatible with pytest 5.4+
- pytest 5.4.0 flipped the signs for assert statement display, so this flips the string to match.
Fix test_fastapi.sh permissions
webknjaz added a commit to cherrypy/cheroot that referenced this pull request Jul 13, 2020
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.

pytest-sugar is not working with pytest v5.4.0 (released on March 12th 2020)
8 participants