Python/Testing: Difference between revisions

From Dev Wiki
Jump to navigation Jump to search
(Create initial page)
(No difference)

Revision as of 02:13, 12 November 2022

Useful Testing Links


Useful Commands

To automatically clear console before running tests, edit your local bash.rc (or equivalent) file and add the following:

function pytest() {
    clear

    pytest $@
}

This is very useful for removing clutter, so when tests fail, you only see results directly related to the recent failure.

Alternatively, change the function name if you wish to keep the base pytest command, while still adding additional functionality.


Checking Code Coverage