opinion: don't bother typing tests (intermediate) anthony explains

Ғылым және технология

today I talk about the approach I take to gradual typing in python -- I don't bother with tests (and why)!
- intro to typing / mypy: • introduction to python...
- gradual typing with mypy: • gradual typing python ...
playlist: • anthony explains
==========
twitch: / anthonywritescode
dicsord: / discord
twitter: / codewithanthony
github: github.com/asottile
stream github: github.com/anthonywritescode
I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!

Пікірлер: 10

  • @ItzAnameOk
    @ItzAnameOk2 жыл бұрын

    Thank you Anthony, very cool!

  • @tandavme
    @tandavme2 жыл бұрын

    for me types are mostly for readability, not for correctness (so no matter in tests or in actual code). You read function header and quickly understand what it does w/o reading docstrings

  • @anthonywritescode

    @anthonywritescode

    2 жыл бұрын

    sure, for this I'm specifically talking about static type checking

  • @stevenbrudenell
    @stevenbrudenell2 жыл бұрын

    I like to annotate tests as a way to test the annotations of the system-under-test. If some usage of the system-under-test is valid, but not annotated correctly, I want mypy to fail. Any thoughts on this?

  • @anthonywritescode

    @anthonywritescode

    2 жыл бұрын

    I do those rarely but I keep them separate from my "executable tests" -- I usually call them "types tests" and really only use them when the types are an important part of the public interface *or* they're sufficiently complicated

  • @stevenbrudenell

    @stevenbrudenell

    2 жыл бұрын

    @@anthonywritescode I would love a video on "type tests"! I've thought about this vaguely but I couldn't find precedent for it.

  • @tej43
    @tej432 жыл бұрын

    I want to purchase keyboard you use. Can you share product model or amazon url?

  • @anthonywritescode

    @anthonywritescode

    2 жыл бұрын

    yep! I do a review of the keyboard here (and the amazon link is in the description): kzread.info/dash/bejne/do6bpbeQlpyqirA.html

  • @sillybuttons925
    @sillybuttons9252 жыл бұрын

    I thought this was going to be "don't bother typing out test cases", as in writing tests :p

  • @anthonywritescode

    @anthonywritescode

    2 жыл бұрын

    I write all my tests in mspaint bay beeeeee

Келесі