Unit Tests in Python || Python Tutorial || Learn Python Programming

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 9. 12. 2017
  • đ™Žđ™©đ™–đ™ź 𝙞𝙣 đ™©đ™đ™š đ™Ąđ™€đ™€đ™„ 𝙄𝙉𝙁𝙄𝙉𝙄𝙏𝙀𝙇𝙔: snu.socratica.com/python Unit tests are a way to make sure your code is correct. Python comes with a built-in unit test framework that makes it easy to write a lot of tests for your software. In fact, many engineers will write a series of tests before they begin coding. This approach is called “test driven development” and is very effective.
    We are happy to dedicate this video to our new VIP Patron, Juan Guillermo Henao. On a day when we lost 7 Patrons in response to Patreon's new fees, Juan made a generous pledge to keep our video production going! Thank you so much, Juan, for helping us to continue our work!
    To learn Python, start our Python Playlist HERE:
    bit.ly/PythonHelloWorld
    Subscribe to Socratica: bit.ly/1ixuu9W
    ♩♩♩♩♩♩♩♩♩♩
    We recommend:
    Python Cookbook, Third edition from O’Reilly
    amzn.to/2sCNYlZ
    The Mythical Man Month - Essays on Software Engineering & Project Management
    amzn.to/2tYdNeP
    Shop Amazon Used Textbooks - Save up to 90%
    amzn.to/2pllk4B
    ♩♩♩♩♩♩♩♩♩♩
    Ways to support our channel:
    â–ș Join our Patreon : / socratica
    â–ș Make a one-time PayPal donation: www.paypal.me/socratica
    â–ș We also accept Bitcoin @ 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
    Thank you!
    ♩♩♩♩♩♩♩♩♩♩
    Connect with us!
    Facebook: / socraticastudios
    Instagram: / socraticastudios
    Twitter: / socratica
    ♩♩♩♩♩♩♩♩♩♩
    Python instructor: Ulka Simone Mohanty (@ulkam on Twitter)
    Written & Produced by Michael Harrison (@mlh496 on Twitter)
    ♩♩♩♩♩♩♩♩♩♩

Komentáƙe • 585

  • @Socratica
    @Socratica  Pƙed 2 lety +21

    Wear a Socratica Python shirt for good luck coding: shop.socratica.com/products/python-by-socratica

  • @Socratica
    @Socratica  Pƙed 4 lety +176

    It's official! The Socratica Python Kickstarter was a success! Thank you to all of our supporters. Because of you, many more Python videos coming soon!! 💜🩉

    • @setudutta3905
      @setudutta3905 Pƙed 4 lety +2

      You guys are amazing...a revolution in the field of teaching.

    • @mohamedharesali8002
      @mohamedharesali8002 Pƙed 4 lety +1

      Please we need more such videos, I have never seen how exactly you confess your code,

  • @unvrknow22
    @unvrknow22 Pƙed 6 lety +602

    To quote FDR, "The only thing we have to fear is if Socratica stops making these awesome Python vids."

    • @sevanshahnazaryan743
      @sevanshahnazaryan743 Pƙed 6 lety +7

      And they stopped...

    • @euler4513
      @euler4513 Pƙed 6 lety +8

      Please don’t stop

    • @aryanmn1569
      @aryanmn1569 Pƙed 4 lety +2

      Fears become to reality, it hurts

    • @guilhermehx7159
      @guilhermehx7159 Pƙed 4 lety +2

      @@aryanmn1569 they will make more videos soon. They started a campaign to raise funds to make a new series of Python videos

    • @gordontang7837
      @gordontang7837 Pƙed 4 lety +1

      for real

  • @jameswright4732
    @jameswright4732 Pƙed 6 lety +215

    The snarky comments are pretty fantastic.

  • @amberstruthers3228
    @amberstruthers3228 Pƙed 2 lety +63

    Your videos are such a breath of fresh air in a world where technical videos can get rather dry. So happy I discovered your channel! :)

    • @Socratica
      @Socratica  Pƙed 2 lety +7

      We're so glad you've found us!! It can be hard to find the good stuff on CZcams. It would be a HUGE help if you share our videos and help us get the word out on the Socials!! 💜🩉

    • @cryptodashboard1173
      @cryptodashboard1173 Pƙed 2 dny

      @@Socratica I see lots of teachers giving various lectures but yours is different in presentation. Sometimes I see u as a robot and confused. Are u for real?...great python vids indeed

  • @HomeWreckerGG
    @HomeWreckerGG Pƙed 5 lety +136

    "You've made your point Python" LOL

  • @sortof3337
    @sortof3337 Pƙed 6 lety +1131

    Who else watches these videos, even though they already know python?

    • @InternationalBigshot
      @InternationalBigshot Pƙed 6 lety +80

      Who watches these videos and doesn't even know what python is?

    • @namahshrestha3226
      @namahshrestha3226 Pƙed 5 lety +38

      I do..for fun..but i walked out with some great info that i missed while i learned python..this is one hell of a tutorial

    • @toshobg
      @toshobg Pƙed 5 lety +4

      it's a Snake

    • @bobfrombilling
      @bobfrombilling Pƙed 5 lety +13

      She cracks me up, love it.

    • @craigbarnett5507
      @craigbarnett5507 Pƙed 5 lety +1

      No but I am rewatching these videos tho. They are great!

  • @alakerejenus8993
    @alakerejenus8993 Pƙed rokem +10

    This is the first coding video I'm commenting on, why? It's awesome. From music, presentation, simplicity, pinpoint, beginner-friendly, the mechanic/robotic voice, and humor (sounds like an AI model learning to speak) to delivery. I love this and I can't express it enough.

  • @dameongraham4444
    @dameongraham4444 Pƙed 5 lety +44

    “...just okay? Python is stingy with praise!” đŸ€Ł Hilarious...I love it! Great vid! Keep up the great work!

  • @pranav9421
    @pranav9421 Pƙed 6 lety +46

    You explain the concepts in such a simple manner that it makes it easy to learn the rest by myself. And the occasional interspersed dry humor makes the whole lesson more memorizable.
    Please do a video on Python Generators.

  • @nothanks7752
    @nothanks7752 Pƙed 6 lety +72

    EE just learning python and I've heard the software engineers talk about creating unittests. I didn't even know what they were talking about until this video so thank you very much. Super clear and straight forward.

    • @devn0n
      @devn0n Pƙed 2 lety

      How's it been so far?

    • @leumas4092
      @leumas4092 Pƙed 4 měsĂ­ci

      hows it going?

  • @maroofshittu
    @maroofshittu Pƙed 6 lety +187

    I have never laughed this hard over unit tests. 10 🌟

  • @maryz.r.avecilla4788
    @maryz.r.avecilla4788 Pƙed 4 lety +4

    I love the voice, very clear and direct to the point. I have found the right tutorial that fits my learning needs. Thank you so much Socratica. I enjoy all the quotes. You are the best of the best!

  • @alexandersage7035
    @alexandersage7035 Pƙed 4 lety +12

    I wish all coding tutorials were of this audio quality.
    Nice unique take on tutorials

  • @pastorhudson
    @pastorhudson Pƙed 5 lety +52

    This is so so good! Your teaching is so clear, and the humor keeps things fun and approachable. You should be very proud of this python series. Thank you!

  • @tylerwelch7472
    @tylerwelch7472 Pƙed 6 lety +1

    These videos are great! I've read a few python books, and followed along with a few different courses, and you're videos have made me actually "understand" the topics you cover.
    Love it! Keep it up !

  • @Socratica
    @Socratica  Pƙed 4 lety +31

    Welcome to Socratica! You can see our entire Python Playlist here: bit.ly/PythonSocratica
    Subscribe to see all our new videos! bit.ly/SocraticaSubscribe

    • @JLenival
      @JLenival Pƙed 3 lety

      I respect you, but 'j' is the only imaginary unit and 'i' is for time variant electrical current or loop index.
      Peace!

    • @joziahbo1858
      @joziahbo1858 Pƙed 2 lety

      I guess im asking the wrong place but does someone know of a method to get back into an instagram account..?
      I somehow forgot the login password. I would love any tips you can give me

    • @stetsoncollin2138
      @stetsoncollin2138 Pƙed 2 lety

      @Joziah Bo instablaster ;)

    • @joziahbo1858
      @joziahbo1858 Pƙed 2 lety

      @Stetson Collin Thanks for your reply. I got to the site on google and Im in the hacking process atm.
      Seems to take quite some time so I will reply here later when my account password hopefully is recovered.

    • @joziahbo1858
      @joziahbo1858 Pƙed 2 lety

      @Stetson Collin it did the trick and I actually got access to my account again. I'm so happy:D
      Thank you so much you really help me out :D

  • @peterlewerin4213
    @peterlewerin4213 Pƙed 5 lety +2

    Very many videos about computers and programming are presented in a rambling, introverted manner. Your videos are crisp and expressive, like good source code. (I like the humor as well.)
    Old Shakespeare indulged in quite a bit of cut-and-pasting, but he wasn't wrong about unit tests. You can't live without them, and you live a lot happier with them.

  • @Maquox
    @Maquox Pƙed 5 lety +55

    "I know, this makes me itch too"
    Totally! hahaha

  • @dhilanchandrasekara4816
    @dhilanchandrasekara4816 Pƙed 4 lety +2

    How am I just discovering this channel now? One of the most entertaining programming tutorials I've ever seen, love your work! :)

  • @johnrine9671
    @johnrine9671 Pƙed 6 lety +155

    I do not see a doc string so lets see if we can pass the function a kitchen sink...

  • @mapa5000
    @mapa5000 Pƙed 3 lety +5

    Fun, intelligent, creative...what a beautiful way to teach coding... thank you for this ... I love your work.!

  • @melissajade7717
    @melissajade7717 Pƙed 2 lety +6

    This lesson was absolutely hilarious, helpful, and beneficial to learning this topic. "Do not fear tests, embrace them". I will think of this every time I am faced with a new one. Thank you, seriously. That is so empowering.

  • @PunmasterSTP
    @PunmasterSTP Pƙed 3 lety +6

    I think it's safe to say that Socratica has really asserted itself as an organization that puts out free, high-quality and extremely entertaining videos!

  • @MyTube4Utoo
    @MyTube4Utoo Pƙed 6 lety +36

    A new Socratica Python video! YAY! Christmas came early!

  • @mrush336
    @mrush336 Pƙed 4 lety +3

    I love the humor. Also very enlightening for me as a beginner. Keep up the good work!

  • @MyTube4Utoo
    @MyTube4Utoo Pƙed 6 lety +9

    This one was a little over my head, but now I know what I need to study.

  • @TommyAMV
    @TommyAMV Pƙed rokem

    I absolutely love you humor! Not to mention I actually understood the topic well enough to implement it in practice, unlike during other 30+ minute vids. Keep up the great work!

  • @nguyenduy-sb4ue
    @nguyenduy-sb4ue Pƙed 5 lety +1

    OMG ! !! the quality of your work is insane !! I really enjoy your videos, please make more

  • @MustbeTheBassest
    @MustbeTheBassest Pƙed 6 lety +13

    I love this damn channel. Seriously, this helps me out so much!

  • @fleboho
    @fleboho Pƙed 5 měsĂ­ci +2

    I'm only 1 minute 27 seconds into the video, and am loving it already.

  • @codeisawesome369
    @codeisawesome369 Pƙed 5 lety +2

    Holy MOLY, the stylishness of CZcams programming channels is going off the charts at this point!

  • @89Valkyrie
    @89Valkyrie Pƙed 6 lety +1

    Every student should watch your videos. Amazing knowledge presented in an incredibly creative, cringe-less, way. Instantly subscribed.

  • @lRadicaLl
    @lRadicaLl Pƙed 6 lety +2

    I love your videos! It's fun, it's elegant, and I'm really learning... thanks a lot!

  • @vladimirrav
    @vladimirrav Pƙed 4 lety +1

    I liked your videos a lot, the best tutorial series I've ever seen. It is very exciting to watch.
    It would be very nice to have a complete data science tutorial like this with statistics, probability and so on.
    Keep the outstanding work, we'll appreciate it!!!

  • @fordfactor
    @fordfactor Pƙed 4 lety

    I've started watching some videos from this channel. They are clear, concise and funny!

  • @retrofutur1st
    @retrofutur1st Pƙed 2 lety

    Way to make a challenging topic entertaining, big props! I'll be incorporating unit testing into my coding from here on out.

  • @selenewaide8994
    @selenewaide8994 Pƙed 6 lety

    OMG!! You rock! You've got yourself a new subscriber. Great content and delivery.

  • @vincentkizza3751
    @vincentkizza3751 Pƙed 3 lety

    Jesus! What a tutorial! Never seen anything like it,I cannot wait for more. Many many thanks.

  • @manuelpineda9067
    @manuelpineda9067 Pƙed 2 lety

    It's amazing how exciting the video makes a subject as unit tests seem.

  • @cpgautam172
    @cpgautam172 Pƙed 4 lety

    thank you for telling how to check all the different assertions, many times my prof would tell us examples for few, and in the exam we only get those few problems. but when solving various problems, it overwhelming how much we dont get taught, at least here u r showing a good place to start.

  • @benjaminmayanja7452
    @benjaminmayanja7452 Pƙed 5 lety +3

    You make programming so cool and hilarious.
    Made my morning.

  • @prlombaard
    @prlombaard Pƙed 6 lety

    As always @Socratica, short simplistic videos, that cuts right to the chase and explains a topic in Python in a very concise manner, giving the Viewer just enough to satisfy the initial curiosity,which prompts the Viewer to then to go study more.

  • @KelDG3
    @KelDG3 Pƙed 4 lety +1

    This channel is legendary! Thanks

  • @FabianBarajas
    @FabianBarajas Pƙed rokem

    omg these are so good. Clear and concise lessons with some hilarious commentary.

  • @quantadotonium3654
    @quantadotonium3654 Pƙed 2 lety

    What an entertaining and exciting way of descriptions of concepts. Besides, the actual content, her sarcasm makes my day! Well done AI!

  • @jackdrost9555
    @jackdrost9555 Pƙed 4 lety +14

    Yes, obviously I will need to subscribe to this channel. I've never belly-laughed while learning Python.

  • @erintracey6554
    @erintracey6554 Pƙed 2 lety

    These videos are not only educational, but fun! Thank you

  • @saeedsedigh1032
    @saeedsedigh1032 Pƙed 5 lety +97

    "if type(r) not in [int,float]:"
    That was smart.

    • @zyptoskid
      @zyptoskid Pƙed 5 lety +8

      yeah better than so many "or" statements

    • @OmegaF77
      @OmegaF77 Pƙed 4 lety +5

      BIG BRAIN TIME

    • @nlight8769
      @nlight8769 Pƙed 3 lety +3

      There are better ways to achieve it actually. With isinstance :
      if not isinstance( r, (int, float) )
      Indeed, if you make a class "INT" that inherits from int like so :
      class INT(int):pass
      *type(INT(5)) == int* would return *False* and not pass the test, while it should.
      Very disapointing ;p

  • @ninasist4667
    @ninasist4667 Pƙed 4 lety

    i love this kind of learning!!! So much better than any other tutorial, it feels like im in a game :D

  • @michaelsvoboda1024
    @michaelsvoboda1024 Pƙed 6 lety

    Why did it take so long to find this exceptional channel? Great format.

  • @jinxkhoche
    @jinxkhoche Pƙed 4 lety +1

    It sounds like I'm attending a briefing of an inter-galactic mission of utmost importance and am being told of my objectives by an intelligent alien-computer. Brilliant!

  • @ricardohincapie1537
    @ricardohincapie1537 Pƙed 4 lety

    Fantastic, simply fantastic. Your concept is so fun!

  • @Socratica
    @Socratica  Pƙed 4 lety +2

    Support what you love! Socratica has a Kickstarter to make more Python: bit.ly/PythonKickstarter

  • @12copablo
    @12copablo Pƙed 4 lety

    Very well explained, great humor and great background sounds!

  • @charlesmorris3888
    @charlesmorris3888 Pƙed 4 lety

    Thank you, this video was an extremely helpful intro to unit testing. The practical example was really helpful.

  • @harrybarrow6222
    @harrybarrow6222 Pƙed 4 lety +1

    I absolutely loved this video, so of course, 👍 and Subscribed + 🔔.
    It really held my attention, made me laugh, and taught me a lot.
    I am an experienced programmer and I have been looking for a Python tutorial series that would not send me to sleep.
    Thank you, Socratica, I have just started your Python course. 😀

  • @lightyearahead
    @lightyearahead Pƙed 4 lety +1

    This is both funny and knowledgeable content. Love this series.

  • @HP-ol2ux
    @HP-ol2ux Pƙed 4 lety

    You are really great. People rarely combine education with humor in such good way. Very nicely done :)

  • @rajputakash1
    @rajputakash1 Pƙed 2 lety

    This is just awesome. Short and sweet.

  • @DaniloSilva-pl3sq
    @DaniloSilva-pl3sq Pƙed 2 lety

    I'd never imagine unit tests were so easy and simple!

  • @Amakratacjan
    @Amakratacjan Pƙed 5 lety +2

    That's trippy in a Command and Conquer game way. Awesome

  • @camilofunez4209
    @camilofunez4209 Pƙed 2 lety

    I just discovered this wonder, and OMG! i feel like a kid with a new toy. This video is AMAZING!. thanks

  • @vivekjoshi3769
    @vivekjoshi3769 Pƙed 7 měsĂ­ci

    Got curious about Unit Tests after somebody mentioned in a community.
    Watched some videos before this one.
    I promise you nowhere I got such clear & concise explanation especially with python code on the screen.
    Some people are born with the ability to make things easier to understand for the world.
    Big Salute to the lady & her Team!

  • @dantedt3931
    @dantedt3931 Pƙed 5 lety +1

    I never thought unit tests would be this fun.She rocks!

  • @ssr142812
    @ssr142812 Pƙed 2 lety

    I was still in shock and staring at her even after watching 5+ videos! Really a different kind of learning and experience! kudos

  • @bmanishap
    @bmanishap Pƙed 5 lety +68

    Very nice video like watching short science fiction movie !!!!

  • @Erin-bc8ic
    @Erin-bc8ic Pƙed 5 lety

    Holy shit this is amazing. Very clearly, functional and with a small dash of humor with an excellent voice.

  • @mathematicalninja2756
    @mathematicalninja2756 Pƙed 6 lety

    I am so glad to stumble upon your channel. you have great content.

  • @ArizonaJewell
    @ArizonaJewell Pƙed 3 lety

    I'm currently finishing up a course on object oriented programming in Python. I didn't really get the lecture on testing, and this is BY FAR one of the best videos I could've asked for for learning Python. It's short and sweet, so I don't need to watch some 40 minutes video.

  • @AdamCorkett
    @AdamCorkett Pƙed rokem

    Love the presentation of these videos!

  • @ufotofu9
    @ufotofu9 Pƙed 4 lety

    This is great. Love the bit and great tutorial!

  • @onokr705
    @onokr705 Pƙed 4 lety +30

    "Trust but verify with unit testing" - William Shakespeare

    • @emPtysp4ce
      @emPtysp4ce Pƙed 4 lety

      Truly, he was a man ahead of his time

  • @johnmalek187
    @johnmalek187 Pƙed rokem

    Great way to teach concepts in Python. I love your humor.

  • @NguyenTran-eq2wg
    @NguyenTran-eq2wg Pƙed 2 lety

    I HAVE TO SAY THIS IS BRILLIANT!

  • @aryaparvizi8755
    @aryaparvizi8755 Pƙed 2 lety

    this video is BRILLIANT lol. hilarious enjoyable while learning a thing or two. loved it

  • @yash1152
    @yash1152 Pƙed rokem

    thats the power of firdt impressions - i saw your one video for the first time about python list comprehensions months ago.
    and today, while searching for python unit tests, other videos i "saved to watch later" - but ur video came, i immediately opened in new tab.

  • @dreamphoenix
    @dreamphoenix Pƙed 4 lety +2

    Your commentary is priceless. "You have got to be kidding me."
    My old physics teacher and you would get along quite well. :)

  • @PradeepBishtcaptains-log
    @PradeepBishtcaptains-log Pƙed 4 lety

    Hands Down !! What a great way to teach something !!

  • @mau_lopez
    @mau_lopez Pƙed 6 lety

    Love this videos ! Really like her and her style, I enjoy it a lot ! Thanks !

  • @quietlyconfidentful
    @quietlyconfidentful Pƙed 6 lety

    Can't get enough of this channel

  • @nktslp3650
    @nktslp3650 Pƙed 4 lety

    That was fun and instructive to watch! Thanks a lot!

  • @porlando12
    @porlando12 Pƙed 4 lety

    This was brilliant and entertaining! Why has it taken me so long to discover Socratica?!

  • @_mvr_
    @_mvr_ Pƙed 6 lety

    i didnt even know python complex numbers were a thing. Bonus info! This series is great

  • @DanielSmith-yx6zm
    @DanielSmith-yx6zm Pƙed 4 lety +1

    This video made my day. I learned something and it was fun

  • @theelysium1597
    @theelysium1597 Pƙed 4 lety

    This is probably the best video I have ever seen on the internet!
    I'm not that much into python tbh and I don't know what else you are doing but I gave you a subscribe ;)

  • @jennyada1429
    @jennyada1429 Pƙed 2 lety

    This is the best tutorial I have ever seen.

  • @diallomamadou258
    @diallomamadou258 Pƙed 4 lety

    A frontend Developer loving the way you explain things, just subscribed.

  • @DUANEYAISER
    @DUANEYAISER Pƙed 6 lety +54

    There's much to love about this series, but I especially love that you use vim. :-)

  • @iamdexterpark
    @iamdexterpark Pƙed 4 lety

    A wonderful video and series. Thank you so much for sharing!

  • @Kevin-zk7xc
    @Kevin-zk7xc Pƙed 4 lety

    One of the funniest and best tutorial I've ever watched

  • @robertb5357
    @robertb5357 Pƙed 3 lety

    Love her sense of humor and delivery. :)

  • @alecteucilide2234
    @alecteucilide2234 Pƙed 2 lety

    Beautiful voice, excellent diction and lovely (and educational) presentation. Great job!

  • @lucidcatnap
    @lucidcatnap Pƙed 4 lety

    This channel is a godsend

  • @guilhermehx7159
    @guilhermehx7159 Pƙed 5 lety

    I am amazed of how fast i learnt from these videos when compared to other courses. fast and easy

  • @davidajimati980
    @davidajimati980 Pƙed rokem

    My bootcamp reccommended your video (not the Docs) Wow!
    I'm amazed, you amazed.
    I'm happy to find your channel

  • @ssardo
    @ssardo Pƙed 3 lety

    Brilliant, love it!

  • @Spainog
    @Spainog Pƙed 5 lety

    Love this Series... Thanks Socratica

  • @rafaelcascalho4180
    @rafaelcascalho4180 Pƙed 6 lety

    That was absolutely helpful, thanks!!

  • @afanoromolyricsofficial
    @afanoromolyricsofficial Pƙed rokem

    socratica is just a gem!