pytest for Unit Testing in Python | How to Python 2 | Python Tutorials

Veröffentlicht am: 01 Januar 1970
auf dem Kanal: Alfonso Gonzalez - Astrodynamics & SE Podcast
417
11

In this video we go over how to use the Python package pytest to implement unit tests using the Astrodynamics with Python repository to go over examples using the Python assert statement, approximately equal function, numpy arrays, warnings, errors, and how to use pytest from the command line by calling it directly or through the Python interpreter.

Link to Astrodynamics with Python GitHub repository: https://github.com/alfonsogonzalez/AWP
Link to LeetCode Algorithms with C++ and Python GitHub repository: https://github.com/alfonsogonzalez/algos

And as a sneak peek to next video, I show one way to utilize the classic Python if _name_ == '__main__' statement to be able to use unit test scripts differently based on if you run the script directly (when _name_ is equal to '__main__' ) vs unit tests (when _name_ does not equal '__main__', it equals the filename without the .py extension since the script is being imported)

#pytest #unittests #pythontutorials


Auf dieser Seite können Sie das Online-Video pytest for Unit Testing in Python | How to Python 2 | Python Tutorials mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Alfonso Gonzalez - Astrodynamics & SE Podcast 01 Januar 1970 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 417 Mal angesehen und es wurde von 11 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!