Completed
Pull Request — master (#1454)
by Abdeali
01:54
created

pytest_unconfigure()   A

Complexity

Conditions 4

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 4
dl 0
loc 7
rs 9.2
1
import os
2
import webbrowser
3
4
5
def pytest_unconfigure(config):
6
    htmlcov_path = os.path.join("htmlcov", "index.html")
7
    if 'html' in config.option.cov_report and os.path.isfile(htmlcov_path):
8
        try:
9
            webbrowser.open_new_tab(htmlcov_path)
10
        except webbrowser.Error:
11
            pass
12