Productive pytest with PyCharm
HTML-код
- Опубликовано: 9 июн 2024
- Testing is a major part of Python development and pytest has become the leading testing framework. Brian Okken, author of the recent book Python Testing with pytest and host of the Test and Code podcast, helps you “level up” your pytest skill.
This webinar is a follow-on to the introductory Visual Testing with PyCharm Oct 2017 webinar with Kenneth Love.
Brian will show:
* Good style for asserts
* Refactoring verbose tests into fixtures and conftest.py files
* Refactoring fixtures
* Using parameterize to repeat similar tests
* Other uses of markers
* Coverage
* Good TDD style
Along the way, Brian will use the productive PyCharm testing features from the first webinar. - Наука
Starts at 2:25
Thank you - so useful! :) parameterize... mind blown... and the auto test run... and a lot of other useful jems! :)
Noob here, I did not clone the repo and tried to do it by myself with the setup and missed the "from setuptools import setup, find_packages " in the setup.py
Very informative webinar :)
I'm getting an error when trying to run the hello world test.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.2\helpers\pycharm\_jb_pytest_runner.py", line 4, in
import pytest
ModuleNotFoundError: No module named 'pytest'
Process finished with exit code 1
Empty suite
Any suggestions?
Please try posting to our community forum.
intellij-support.jetbrains.com/hc/en-us/community/topics/200379535-PyCharm
How'd he set up the functions on one side of the pane and tests on the other side? @16:04 mark
In PyCharm, tool windows such as "Run" have a little gear in the header. Click on that, choose "Move to -> Right". I do that all the time on my wide external monitor...and if you have any other questions, reply to this comment. I love talking about this.
@@pauleveritt201 thank you.
I like his shirt :P
WOW, great info!
You must see this video in 1.5x speed.
Totally
I appreciate Brian's effort but he must improve his live skills, as I believe many people felt lost on several moments during this webinar. I believe the book is much better
Have you read his book ? Would you recommend it to someone who wants to learn testing in Python once and for all.
First time I watched it I fall asleep. The second time I searched the comments to find someone mentions this.
I did read it and I would recommend it. It's well written and full of examples.
Just keep in mind that is a book on pytest and not on testing in general, but considering pytest is the de-facto standard for the foreseeable future, it's a good move to learn it.
Agree. He may know a lot but could not collect his thoughts and explain his point of view. I lost often. On the otherside, he shows great stuffs.
this was not my experience. I understood where he was going, indeed I wish in a few cases he could have jumped a few second out of the video so he could show more complete answers, while still keeping the pace. At 1.5 hours I would want it to be a touch SHORTER not LONGER. but that is me.
I prefer a text editor :)
The interviewer was very disruptive and spoiled the flow of the presenter. The presenter, however, was very knowledgeable.