push
github
657 of 9430 branches covered (6.97%)
Branch coverage included in aggregate %.
229 of 523 new or added lines in 42 files covered. (43.79%)
11303 existing lines in 316 files now uncovered.14765 of 39346 relevant lines covered (37.53%)
0.38 hits per line
| 1 |
def check_mongoId(s: str): |
1✔ |
| 2 |
"""Sprawdza, czy to prawidłowy mongoId z PBNu"""
|
|
| 3 |
|
|
|
UNCOV
4
|
valid_letters = "0123456789abcdef"
|
× |
| 5 |
|
|
|
UNCOV
6
|
if len(s) == 24 and all(letter in valid_letters for letter in s.lower()): |
|
|
UNCOV
7
|
try:
|
× |
|
UNCOV
8
|
int(s, 16) |
× |
| 9 |
except (TypeError, ValueError): |
× |
| 10 |
return False |
× |
| 11 |
|
|
|
UNCOV
12
|
return True |
× |
| 13 |
|
|
|
UNCOV
14
|
return False |
× |