Testing code can be repetitive and if done maunually it can lead to errors being missed. Use unittest to run standard tests of your functions.
This is not a tutorial, more a 'demonstration' of how quickly you can test your program's function(s) and use the various options available to check for True, False, Equal and many more.
I've used IDLE as the IDE and Windows 10 as the OS (VM was busy running Linux for a special mission).
There is no need for any specific IDE or OS, the tests will work regardless.
If you check the Python documentation they show an example with some expected results (assertions) and some tests (steps).
This is my first adventure into the world of testing, but I like it, as it is a nice example of automation. Please comment / offer advice if you like to.
And remember : Take the time out to f label things
#Python #Code #Sotwaretesting
Check out the Minimalist online python IDE :
https://epyco.herokuapp.com/
https://epico.herokuapp.com/
Buy Dr Pi a Coffee...or Tea! : https://www.buymeacoffee.com/DrPi
На этой странице сайта вы можете посмотреть видео онлайн Testing with unittest | Python Code длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь jobstr 11 Март 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 31 раз и оно понравилось 2 зрителям. Приятного просмотра!