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 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
57Uses nmcli on Linux in a short, simple Mozilla Location Services with Wifi from Python.
Original file line number Diff line number Diff line change 77CI = bool (os .environ ['CI' ]) if 'CI' in os .environ else False
88
99
10+ @pytest .mark .skipif (CI , reason = "CI doesn't have WiFi" )
1011def 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" )
1618def test_nm_connection ():
1719 mozloc .nm_config_check ()
1820
Original file line number Diff line number Diff line change 11import 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
3236if __name__ == '__main__' :
3337 pytest .main ()
You can’t perform that action at this time.
0 commit comments