MENU

Fun & Interesting

You can write TESTS in your docs?!

Carberra 9,663 6 months ago
Video Not Working? Fix It Now

One of the things I really like about Rust is the built-in support for running tests inside documentation to make sure the docs are all correct. Turns out though that Python had it this whole time and I didn't know! It's a really cool feature though, so thought I'd show it off! 0:00 - Intro 1:02 - Writing the tests 3:20 - Running the tests 5:46 - Running in unittest tests 7:49 - Running in PyTest 8:32 - Outro — If you want to see more of me, join my Discord server! https://discord.gg/5vVgQpK I get a lot of people asking, so here's my setup! • Visual Studio Code: https://youtu.be/PBQspYkkksU • Terminal: https://youtu.be/4RuGK3w6Mbs • Desk/recording gear: https://kit.co/Carberra • PC build: https://uk.pcpartpicker.com/list/TmzGYN Affiliations (I may earn a commission): • Codecrafters -- 40% off any plan: https://app.codecrafters.io/join?via=parafoxia • Keeper Password Manager -- 30% off your first year: https://keeper.io/r/EX4FB1C — If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so. #python #coding #howto

Comment