File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1
1
[ ![ Python versions (PyPI)] ( https://img.shields.io/pypi/pyversions/mozilla-location-python.svg )] ( https://pypi.python.org/pypi/mozilla-location-python )
2
2
[ ![ 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
+
3
5
4
6
# mozilla-location-python
5
7
Uses nmcli on Linux in a short, simple Mozilla Location Services with Wifi from Python.
Original file line number Diff line number Diff line change 7
7
CI = bool (os .environ ['CI' ]) if 'CI' in os .environ else False
8
8
9
9
10
+ @pytest .mark .skipif (CI , reason = "CI doesn't have WiFi" )
10
11
def test_nm_loc ():
11
12
loc = mozloc .get_nmcli ()
12
13
assert isinstance (loc , dict )
13
14
assert isinstance (loc ['t' ], datetime .datetime )
14
15
15
- pytest .mark .skipif (CI , reason = "CI doesn't have WiFi" )
16
+
17
+ @pytest .mark .skipif (CI , reason = "CI doesn't have WiFi" )
16
18
def test_nm_connection ():
17
19
mozloc .nm_config_check ()
18
20
Original file line number Diff line number Diff line change 1
1
import pytest
2
- from simplekml import Kml
3
-
2
+ try :
3
+ from simplekml import Kml
4
+ except ImportError :
5
+ Kml = None
4
6
5
- def gen_kml ():
7
+
8
+ @pytest .mark .skipif (Kml is None , reason = "SimpleKML wasn't installed" )
9
+ def test_kml ():
6
10
# Data for the track
7
11
when = ["2010-05-28T02:02:09Z" ,
8
12
"2010-05-28T02:02:35Z" ,
@@ -27,7 +31,7 @@ def gen_kml():
27
31
trk .newgxcoord (coord )
28
32
29
33
kml .save ('Test.kml' )
30
-
34
+
31
35
32
36
if __name__ == '__main__' :
33
37
pytest .main ()
You can’t perform that action at this time.
0 commit comments