push
github
53 of 53 new or added lines in 6 files covered. (100.0%)
26 existing lines in 2 files now uncovered.3753 of 3896 relevant lines covered (96.33%)
152.52 hits per line
1 |
|
|
2 |
# Drop this when minimum supported version will be 3.7.
|
|
3 |
try:
|
185✔ |
4 |
import threading |
185✔ |
5 |
except ImportError: |
× |
6 |
import dummy_threading as threading # noqa: F401 |
× |
7 |
|
|
|
import json # noqa: F401 |
185✔ |
|
try:
|
185✔ |
|
import orjson as json # noqa: F811 |
185✔ |
|
except ImportError: |
185✔ |
|
pass
|
185✔ |
13 |
|
|
|
try:
|
185✔ |
|
import ujson as json # noqa: F811,F401 |
185✔ |
|
except ImportError: |
185✔ |
|
pass
|
185✔ |
18 |
|
|
19 |
|
|
20 |
try:
|
185✔ |
21 |
# since tzlocal 4.0+
|
|
22 |
# this will avoid warning for get_localzone().key
|
|
23 |
from tzlocal import get_localzone_name |
185✔ |
24 |
|
|
25 |
def get_localzone_name_compat(): |
185✔ |
26 |
try:
|
185✔ |
27 |
return get_localzone_name()
|
185✔ |
UNCOV
28
|
except Exception: |
× |
UNCOV
29
|
return None |
× |
UNCOV
30
|
except ImportError: |
× |
UNCOV
31
|
from tzlocal import get_localzone |
× |
32 |
|
|
UNCOV
33
|
def get_localzone_name_compat(): |
× |
UNCOV
34
|
try:
|
× |
UNCOV
35
|
return get_localzone().key
|
× |
UNCOV
36
|
except AttributeError: |
× |
UNCOV
37
|
return get_localzone().zone
|
× |
UNCOV
38
|
except Exception: |
× |
UNCOV
39
|
return None |
× |