Skip to content

Commit 79f5a46

Browse files
committed
badge
1 parent b2b7dbc commit 79f5a46

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[![Python versions (PyPI)](https://img.shields.io/pypi/pyversions/mozilla-location-python.svg)](https://pypi.python.org/pypi/mozilla-location-python)
22
[![Distribution format (PyPI)](https://img.shields.io/pypi/format/mozilla-location-python.svg)](https://pypi.python.org/pypi/mozilla-location-python)
3+
[![PyPi Download stats](http://pepy.tech/badge/mozilla-location-python)](http://pepy.tech/project/mozilla-location-python)
4+
35

46
# mozilla-location-python
57
Uses nmcli on Linux in a short, simple Mozilla Location Services with Wifi from Python.

tests/test_all.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
CI = bool(os.environ['CI']) if 'CI' in os.environ else False
88

99

10+
@pytest.mark.skipif(CI, reason="CI doesn't have WiFi")
1011
def test_nm_loc():
1112
loc = mozloc.get_nmcli()
1213
assert isinstance(loc, dict)
1314
assert isinstance(loc['t'], datetime.datetime)
1415

15-
pytest.mark.skipif(CI, reason="CI doesn't have WiFi")
16+
17+
@pytest.mark.skipif(CI, reason="CI doesn't have WiFi")
1618
def test_nm_connection():
1719
mozloc.nm_config_check()
1820

tests/test_kml.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import pytest
2-
from simplekml import Kml
3-
2+
try:
3+
from simplekml import Kml
4+
except ImportError:
5+
Kml = None
46

5-
def gen_kml():
7+
8+
@pytest.mark.skipif(Kml is None, reason="SimpleKML wasn't installed")
9+
def test_kml():
610
# Data for the track
711
when = ["2010-05-28T02:02:09Z",
812
"2010-05-28T02:02:35Z",
@@ -27,7 +31,7 @@ def gen_kml():
2731
trk.newgxcoord(coord)
2832

2933
kml.save('Test.kml')
30-
34+
3135

3236
if __name__ == '__main__':
3337
pytest.main()

0 commit comments

Comments
 (0)