6
6
7
7
Example use:
8
8
source .venv/bin/activate
9
- pytest tests/test_report_lint .py -v
10
- pytest tests/test_report_lint .py::test_some_specific_function -v
9
+ pytest tests/test_report_pylint .py -v
10
+ pytest tests/test_report_pylint .py::test_some_specific_function -v
11
11
pytest --cov=src/rattlesnake --cov-report=xml --cov-report=html --cov-report=term-missing
12
12
"""
13
13
19
19
from typing import Final
20
20
21
21
import pytest
22
- from rattlesnake .cicd .report_lint import (
22
+ from rattlesnake .cicd .report_pylint import (
23
23
get_issue_counts ,
24
24
get_issues_list_html ,
25
25
get_pylint_content ,
@@ -105,7 +105,7 @@ def test_main_success(monkeypatch, capsys):
105
105
106
106
monkeypatch .setattr ("argparse.ArgumentParser.parse_args" , lambda self : mock_args )
107
107
monkeypatch .setattr (
108
- "rattlesnake.cicd.report_lint .run_pylint_report" ,
108
+ "rattlesnake.cicd.report_pylint .run_pylint_report" ,
109
109
lambda * args , ** kwargs : (
110
110
10 ,
111
111
{"convention" : 1 , "warning" : 2 , "error" : 3 , "refactor" : 4 },
@@ -136,7 +136,7 @@ def test_main_file_not_found(monkeypatch, capsys):
136
136
137
137
monkeypatch .setattr ("argparse.ArgumentParser.parse_args" , lambda self : mock_args )
138
138
monkeypatch .setattr (
139
- "rattlesnake.cicd.report_lint .run_pylint_report" ,
139
+ "rattlesnake.cicd.report_pylint .run_pylint_report" ,
140
140
lambda * args , ** kwargs : exec ('raise FileNotFoundError("File not found")' ),
141
141
)
142
142
@@ -160,7 +160,7 @@ def test_main_io_error(monkeypatch, capsys):
160
160
161
161
monkeypatch .setattr ("argparse.ArgumentParser.parse_args" , lambda self : mock_args )
162
162
monkeypatch .setattr (
163
- "rattlesnake.cicd.report_lint .run_pylint_report" ,
163
+ "rattlesnake.cicd.report_pylint .run_pylint_report" ,
164
164
lambda * args , ** kwargs : exec ('raise IOError("Permission denied")' ),
165
165
)
166
166
@@ -184,7 +184,7 @@ def test_main_unexpected_error(monkeypatch, capsys):
184
184
185
185
monkeypatch .setattr ("argparse.ArgumentParser.parse_args" , lambda self : mock_args )
186
186
monkeypatch .setattr (
187
- "rattlesnake.cicd.report_lint .run_pylint_report" ,
187
+ "rattlesnake.cicd.report_pylint .run_pylint_report" ,
188
188
lambda * args , ** kwargs : exec ('raise Exception("Something went wrong")' ),
189
189
)
190
190
0 commit comments