Professional Python Testing with Mocks

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 28

  • @sadikplayz976
    @sadikplayz976 ปีที่แล้ว +8

    This channel is underrated AF!

  • @joaovitorfrossard7317
    @joaovitorfrossard7317 10 หลายเดือนก่อน +2

    English is my second language and the explainings are so clear that I understood everything in this tutorial. Very well explained and examplified. Thank you so much.

  • @JorgeEscobarMX
    @JorgeEscobarMX ปีที่แล้ว +6

    Most people don't use mocks and they just hope that the database or the internet or whatever other service works during the test run phase. A good use case is when there is expected to get a reponse from the user like in the input() function, the test would just wait until someone input some data and press enter. Mocking the input() function allows the test to run uninterrupted.

  • @20ted09
    @20ted09 ปีที่แล้ว +1

    This is now my GO TO channel for python. Absolutely top class tutorials!

  • @justmogen7383
    @justmogen7383 ปีที่แล้ว +1

    the explanation from beginning is awesome mahn! Very concise

  • @highradqa
    @highradqa 7 หลายเดือนก่อน

    You're my champion from now on dude. Great vid !!!!!!!

  • @eugenmalatov5470
    @eugenmalatov5470 8 หลายเดือนก่อน +1

    The introduction was excellent. But then I do not understand the first example. The individual lines are not really very well explained.
    How does the assert_called_with work, and why does it send an error?

  • @CristianMolina
    @CristianMolina 11 หลายเดือนก่อน

    Also, to test error conditions it's great to use mocks on the dependencies

  • @Deepu1014
    @Deepu1014 ปีที่แล้ว +1

    What is MagicMock? Can you show small demo with it?

  • @mohitmansi11
    @mohitmansi11 11 หลายเดือนก่อน

    Very well explained. Please come up with more such videos and examples. Thanks .

  • @dsinghr
    @dsinghr 8 หลายเดือนก่อน

    this was very helpful. Is there a follow up video for more such examples? thanks

  • @thee_apedo_guy
    @thee_apedo_guy 9 หลายเดือนก่อน

    That was sensational, feeling 🏋️‍♀️🏋️‍♀️

  • @JorgeEscobarMX
    @JorgeEscobarMX ปีที่แล้ว

    A little chaotic and the examples were very well done.

  • @allandasantos9680
    @allandasantos9680 ปีที่แล้ว

    Very good. I would like to see more videos about mocks but using magic mock

  • @GigiSher-td2zs
    @GigiSher-td2zs 5 หลายเดือนก่อน

    thank you for the nice video. if I use pytest, what is the mock lib you recommend?

  • @codyswanner6064
    @codyswanner6064 6 หลายเดือนก่อน +3

    Feels like you understand how this works, but you don't understand how to explain it to me. From what I do understand, you seem to be waaaay oversimplifying the example for the sake of speed, when I as a person new to this need things to be a little more fleshed out and verbose to be able to follow what's going on.

  • @ButchCassidyAndSundanceKid
    @ButchCassidyAndSundanceKid ปีที่แล้ว +1

    Very well explained. Thanks.

  • @geordiehowell9087
    @geordiehowell9087 ปีที่แล้ว

    such great explanation. thank you

  • @vitorsouza6604
    @vitorsouza6604 ปีที่แล้ว +2

    That was quite confusing.

  • @HandyAndyG
    @HandyAndyG ปีที่แล้ว +3

    That assertEqual, for the first example using requests, is bad code. Testing that the value used in the mock is the value returned from the mocked call is nonsensical. Equivalent to testing that 1 == 1. Useless tests are worse than no tests.

    • @aflous
      @aflous ปีที่แล้ว +2

      Not really, you're testing against regressions here. There are so many ways in which the client code could change to break this assumption

  • @expectolimited
    @expectolimited 2 หลายเดือนก่อน

    10:41

  • @alavvaf
    @alavvaf 7 หลายเดือนก่อน

    thanks

  • @masoooomx
    @masoooomx 3 หลายเดือนก่อน

    dw mate, noone saw you checking the code on the right side screen..😂 nice content btw

  • @philtoa334
    @philtoa334 ปีที่แล้ว

    Thx_.

  • @mazaheri.pourya
    @mazaheri.pourya ปีที่แล้ว +4

    that wasn't good example to teach mock 👎