Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python unittest coverage main function

# N.B. works for Python, no guarantee with other languages.
# if you want to exclude the 'main' function in the test
# create a .coveragerc file and write the following lines:

[report]

exclude_lines =
    if __name__ == .__main__.:
 
PREVIOUS NEXT
Tagged: #python #unittest #coverage #main #function
ADD COMMENT
Topic
Name
5+1 =