Hi Kris Jordan the video you made is very usefull for me the way you teach is awesome do more videos excited to learn and gain knowledge from this channel
my vscode was not able to pick up on tests. But once I added __init__.py, it started picking things up. Could anyone share their insight in regards to this behavior?
Hey Kris, great video that explains important concepts in a simple and clear way. Just a few small things I wanted to point out: Although all the tests passed, * That last implementation of the join() function you have, always has value of generated_string equal to the empty string. And so, clearly, the second branch of the if statement never gets tested. * Also, for a use case where the delimiter is not the empty string and where you have a list with more than one item, the return value of join will be wrong and none of the tests would catch that. But again, you did mention later that passing all tests does not guarantee a correct function implementation.
Thanks for the helpful video. I would suggest editing the content down to just the essential parts to reduce the video length maybe. Also perhaps break the content into sections and time stamp each section
When specifying parameter types and return types it's most valuable. When first learning programming, being explicit and intentional about types can generally help with understanding and in avoiding common accidental mistakes.
@@abrahamowos Python is dynamically typed language so you don't need to specify the data type, if you don't you will write less code wchich is Python's strong side. However, specifying the data type of the attributes of classes or functions makes the code more readable to other programmers because the IDE displays additional information about how to use the class or function.
Try running pytest from your command-line. It's likely you've got a syntax error somewhere in a python file that's preventing the collection from working.
Can you make more videos about testing please? specially reading logs from a hardware and save the data in DB somewhere or similar topics. it's more practical for everyone.
What is the course that this video is a part of? Is it free or can i purchase it somewhere. I like your coding practises and habits and i want to pick up some of that myself. :)
You can follow along with this semester's course at 21s.comp110.com - I am thinking about doing a more advanced follow on course this summer (remote) and would be happy to have more folks following along. If interested, I'll announce it on my (infrequent) newsletter here: krisjordan.substack.com/
One comment - I was not part of the previous class lessons and test environment was failing until I added the empty file : "__init__.py" to the file structure.
Very nice video, could be better with complex real problems. However its difficult to arrange test data.. one question, if our code, functions are not testable easily does it mean that we overloaded a functions with more functionality and we compromised from cohesion so the code is highly coupled and we can't test it easily?? Anyways I'm happy to subscribe and follow up your videos, so clear explanation thnx
Kris gives the clearest explanations of this material anywhere, hands down. Thank you!
Ah dude 2 years later and I still needed this... Awesome video regardless.
Awesome. The methodical way in which working with Pytest was explained was just what I needed.
So glad to hear it, thanks for the feedback!
super underestimated. I cannot emphasize how we need to support you up to bypass all those 'hello guys' people on youtube.
Very nice explanation and demonstration of unit testing using PyTest. Cheers!
some lucky students to have your guidance and patience. beats floating around the internet trying to learn python by your self.
Awesome. Very easy to understand.
Of all the videos I saw on pytest, yours is the best. 👍💯
Hi Kris Jordan the video you made is very usefull for me the way you teach is awesome do more videos excited to learn and gain knowledge from this channel
Came across this trying to add some tests to a new project, extremely helpful, thanks!
Just what I needed! Thanks!!
Useful tutorial, really easy to understand. Thank you!
Is the Testing module in VS Code still supported? In my VsCode it simply doesnt work.
thanks man, love this
Thanks for the video! Where is whole playlist for the whole course?
my vscode was not able to pick up on tests. But once I added __init__.py, it started picking things up. Could anyone share their insight in regards to this behavior?
Hey Kris, great video that explains important concepts in a simple and clear way.
Just a few small things I wanted to point out:
Although all the tests passed,
* That last implementation of the join() function you have, always has value of generated_string equal to the empty string.
And so, clearly, the second branch of the if statement never gets tested.
* Also, for a use case where the delimiter is not the empty string and where you have a list with more than one item, the return value of join will be wrong and none of the tests would catch that.
But again, you did mention later that passing all tests does not guarantee a correct function implementation.
Too good explanation and demo. Best video for pytest to begin with. Thanks for the video. 👍👌
Hi sir
I have a question
result: float = 0.0 what does it mean
Total (xs: list[float]) what does it mean
The : float and :List[float] parts are specific the types of the variable and parameter, respectively.
Great tutorial, thanks!
how do we test function which has dataframe or any other dependency. not able to discover any test and getting error as "module not found" ???
How do you get the terminal output colored like that?
Great course
Thanks for the helpful video. I would suggest editing the content down to just the essential parts to reduce the video length maybe. Also perhaps break the content into sections and time stamp each section
Thanks for the suggestions!
Not even one second should be subtracted from this video, especially for those just getting started with testing.
thanks for sharing and the time stamps. What's the theme you are using. feels more easy for my eyes compared to the one i use!
Shades of purple is the name, I believe!
@@KrisJordan You are spot on. Also Great stuff again! Time to get productive with my tests
Is pytest good to write regression test cases , Iam trying to implement DB testing through pytest what are your thoughts on this ?
result: float =0.0.
Is this pythonic?
And when should we normally use it?
When specifying parameter types and return types it's most valuable. When first learning programming, being explicit and intentional about types can generally help with understanding and in avoiding common accidental mistakes.
Ohhhkay. Compare to other programming languages that must specify the var type, I guess this is very optional in python.
@@abrahamowos Python is dynamically typed language so you don't need to specify the data type, if you don't you will write less code wchich is Python's strong side. However, specifying the data type of the attributes of classes or functions makes the code more readable to other programmers because the IDE displays additional information about how to use the class or function.
@@krzysiekkrzysiek9059 thank you for responding
I keep getting "collected 0 items" and the plugin line doesn't appear. I know its vague but can you think of anything I might be doing wrong?
Try running pytest from your command-line. It's likely you've got a syntax error somewhere in a python file that's preventing the collection from working.
great one thanks for posting.. BTW at 31:59: I would think of forming IP Address with period (.) as delimiter for example.. :)
Can you make more videos about testing please? specially reading logs from a hardware and save the data in DB somewhere or similar topics. it's more practical for everyone.
Ask for his Patreon and get him some coffees and he'll definitely make your content!
Loved it sir learned a lot :-) Thank you so much
What is the course that this video is a part of? Is it free or can i purchase it somewhere. I like your coding practises and habits and i want to pick up some of that myself. :)
You can follow along with this semester's course at 21s.comp110.com - I am thinking about doing a more advanced follow on course this summer (remote) and would be happy to have more folks following along. If interested, I'll announce it on my (infrequent) newsletter here: krisjordan.substack.com/
@@KrisJordan is it going to be a bootcamp? If remote even?
@@swammydev my current thinking is a remote workshop 2-4 weeks long aimed at a level that is just beyond the videos produced here.
@@KrisJordan this sounds awesome 👌 what topics do you want to cover? 2-4 weeks seems dense. But i love the idea.
@@swammydev open to suggestions! What topics would be valuable?
One comment - I was not part of the previous class lessons and test environment was failing until I added the empty file : "__init__.py" to the file structure.
Very nice video, could be better with complex real problems. However its difficult to arrange test data.. one question, if our code, functions are not testable easily does it mean that we overloaded a functions with more functionality and we compromised from cohesion so the code is highly coupled and we can't test it easily??
Anyways I'm happy to subscribe and follow up your videos, so clear explanation thnx
Great
50:47 - "Great Work!"
No u! :D
glassware police: that's a flask (Erlenmeyer) not a beaker :P