-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests-python.txt
247 lines (199 loc) · 7.36 KB
/
run-tests-python.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
Running automated test file(s):
===============================================================================
Running: pylint ./src
************* Module saddle_points.saddle_points
src/saddle_points/saddle_points.py:6:0: C0301: Line too long (101/100) (line-too-long)
src/saddle_points/saddle_points.py:35:0: C0301: Line too long (182/100) (line-too-long)
src/saddle_points/saddle_points.py:56:0: C0301: Line too long (187/100) (line-too-long)
------------------------------------------------------------------
Your code has been rated at 7.50/10 (previous run: 7.50/10, +0.00)
real 0m0.792s
user 0m0.699s
sys 0m0.096s
===============================================================================
Running: ruff check --ignore E501 ./src
real 0m0.075s
user 0m0.027s
sys 0m0.051s
===============================================================================
Running: pyright --stats ./src
Found 2 source files
pyright 1.1.347
0 errors, 0 warnings, 0 informations
Completed in 0.647sec
Analysis stats
Total files parsed and bound: 20
Total files checked: 2
Timing stats
Find Source Files: 0sec
Read Source Files: 0.01sec
Tokenize: 0.04sec
Parse: 0.04sec
Resolve Imports: 0.06sec
Bind: 0.06sec
Check: 0.13sec
Detect Cycles: 0sec
real 0m1.314s
user 0m1.210s
sys 0m0.229s
===============================================================================
Running: bandit --verbose --recursive ./src
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.12.1
Run started:2024-01-17 16:08:28.491257
Files in scope (2):
./src/saddle_points/__init__.py (score: {SEVERITY: 0, CONFIDENCE: 0})
./src/saddle_points/saddle_points.py (score: {SEVERITY: 0, CONFIDENCE: 0})
Files excluded (2):
./src/saddle_points/__pycache__/__init__.cpython-312.pyc
./src/saddle_points/__pycache__/saddle_points.cpython-312.pyc
Test results:
No issues identified.
Code scanned:
Total lines of code: 35
Total lines skipped (#nosec): 0
Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0
Run metrics:
Total issues (by severity):
Undefined: 0
Low: 0
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 0
Files skipped (0):
real 0m0.253s
user 0m0.176s
sys 0m0.079s
===============================================================================
Running: refurb ./src
real 0m1.130s
user 0m1.053s
sys 0m0.079s
===============================================================================
python -m doctest -v ./src/saddle_points/__init__.py ./src/saddle_points/saddle_points.py
1 items had no tests:
__init__
0 tests in 1 items.
0 passed and 0 failed.
Test passed.
Trying:
matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
Expecting nothing
ok
Trying:
list(map(max, matrix))
Expecting:
[3, 6, 9]
ok
Trying:
print(*matrix)
Expecting:
[1, 2, 3] [4, 5, 6] [7, 8, 9]
ok
Trying:
list(zip(*matrix))
Expecting:
[(1, 4, 7), (2, 5, 8), (3, 6, 9)]
ok
Trying:
list(map(min, zip(*matrix)))
Expecting:
[1, 2, 3]
ok
Trying:
max_rows = list(map(max, matrix))
Expecting nothing
ok
Trying:
min_columns = list(map(min, zip(*matrix)))
Expecting nothing
ok
Trying:
list(enumerate(max_rows))
Expecting:
[(0, 3), (1, 6), (2, 9)]
ok
Trying:
list(enumerate(min_columns))
Expecting:
[(0, 1), (1, 2), (2, 3)]
ok
Trying:
[{"row": row_id + 1, "column": col_id + 1} for row_id, row_maximums in enumerate(max_rows) for col_id, col_minimums in enumerate(min_columns) if row_maximums == col_minimums]
Expecting:
[{'row': 1, 'column': 3}]
ok
1 items had no tests:
saddle_points
1 items passed all tests:
10 tests in saddle_points.saddle_points
10 tests in 2 items.
10 passed and 0 failed.
Test passed.
real 0m0.143s
user 0m0.085s
sys 0m0.059s
===============================================================================
==> .coveragerc <==
[run]
omit = __init__.py, *_test.py
Running: PYTHONPATH=./src pytest --verbose --cov=. --cov-branch --cov-report=term-missing --cov-report=xml:.coverage.xml -p no:randomly ./test
============================= test session starts ==============================
platform linux -- Python 3.12.1, pytest-7.4.3, pluggy-1.3.0 -- /home/vpayno/.pyenv/versions/3.12.1/bin/python
cachedir: .pytest_cache
rootdir: /home/vpayno/git_vpayno/exercism-workspace/python/saddle-points
configfile: pytest.ini
plugins: anyio-4.2.0, libtmux-0.25.0, pylama-8.4.1, cov-4.1.0, datafiles-3.0.0, docker-2.0.1, subprocess-1.5.0, typeguard-4.1.5
collecting ... collected 10 items
test/saddle_points_test.py::SaddlePointsTest::test_can_identify_lack_of_saddle_points_when_there_are_none PASSED [ 10%]
test/saddle_points_test.py::SaddlePointsTest::test_can_identify_multiple_saddle_points_in_a_column PASSED [ 20%]
test/saddle_points_test.py::SaddlePointsTest::test_can_identify_multiple_saddle_points_in_a_row PASSED [ 30%]
test/saddle_points_test.py::SaddlePointsTest::test_can_identify_saddle_point_in_bottom_right_corner PASSED [ 40%]
test/saddle_points_test.py::SaddlePointsTest::test_can_identify_saddle_points_in_a_non_square_matrix PASSED [ 50%]
test/saddle_points_test.py::SaddlePointsTest::test_can_identify_single_saddle_point PASSED [ 60%]
test/saddle_points_test.py::SaddlePointsTest::test_can_identify_that_empty_matrix_has_no_saddle_points PASSED [ 70%]
test/saddle_points_test.py::SaddlePointsTest::test_can_identify_that_saddle_points_in_a_single_column_matrix_are_those_with_the_minimum_value PASSED [ 80%]
test/saddle_points_test.py::SaddlePointsTest::test_can_identify_that_saddle_points_in_a_single_row_matrix_are_those_with_the_maximum_value PASSED [ 90%]
test/saddle_points_test.py::SaddlePointsTest::test_irregular_matrix PASSED [100%]
---------- coverage: platform linux, python 3.12.1-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
--------------------------------------------------------------
saddle_points.py 12 0 4 0 100%
--------------------------------------------------------------
TOTAL 12 0 4 0 100%
Coverage XML written to file .coverage.xml
============================== 10 passed in 0.07s ==============================
real 0m0.842s
user 0m0.734s
sys 0m0.108s
===============================================================================
Running: coverage report --show-missing
Name Stmts Miss Branch BrPart Cover Missing
--------------------------------------------------------------
saddle_points.py 12 0 4 0 100%
--------------------------------------------------------------
TOTAL 12 0 4 0 100%
real 0m0.171s
user 0m0.105s
sys 0m0.069s
===============================================================================
coverage annotate
real 0m0.149s
user 0m0.096s
sys 0m0.054s
tail -n 10000 ./*,cover | grep -E -C 3 '^> def |^! '
> def saddle_points(matrix: list[list[int]]) -> list[dict[str, int]]:
> """Finds the potential trees where you could build your tree house.
===============================================================================
Running: misspell ./src/saddle_points/__init__.py ./src/saddle_points/saddle_points.py
real 0m0.021s
user 0m0.020s
sys 0m0.013s
===============================================================================