push
github
1 of 1 new or added line in 1 file covered. (100.0%)
25 existing lines in 2 files now uncovered.3681 of 3825 relevant lines covered (96.24%)
146.77 hits per line
1 |
|
|
2 |
# Drop this when minimum supported version will be 3.7.
|
|
3 |
try:
|
177✔ |
4 |
import threading |
177✔ |
5 |
except ImportError: |
× |
6 |
import dummy_threading as threading # noqa: F401 |
× |
7 |
|
|
8 |
try:
|
177✔ |
9 |
# since tzlocal 4.0+
|
|
10 |
# this will avoid warning for get_localzone().key
|
|
11 |
from tzlocal import get_localzone_name |
177✔ |
12 |
|
|
13 |
def get_localzone_name_compat(): |
177✔ |
14 |
try:
|
177✔ |
15 |
return get_localzone_name()
|
177✔ |
16 |
except Exception: |
× |
17 |
return None |
× |
UNCOV
18
|
except ImportError: |
× |
UNCOV
19
|
from tzlocal import get_localzone |
× |
20 |
|
|
UNCOV
21
|
def get_localzone_name_compat(): |
× |
UNCOV
22
|
try:
|
× |
UNCOV
23
|
return get_localzone().key
|
× |
UNCOV
24
|
except AttributeError: |
× |
UNCOV
25
|
return get_localzone().zone
|
× |
26 |
except Exception: |
× |
27 |
return None |
× |