Skip geocoding tests if building on debian (no internet)
Johan Van de Wauw
9 years ago
|
0 |
From: Johan Van de Wauw <johan.vandewauw@gmail.com>
|
|
1 |
Date: Thu, 18 Dec 2014 08:54:15 +0100
|
|
2 |
Subject: Skip tests if building on debian (no internet)
|
|
3 |
|
|
4 |
---
|
|
5 |
tests/test_geocode.py | 1 +
|
|
6 |
1 file changed, 1 insertion(+)
|
|
7 |
|
|
8 |
diff --git a/tests/test_geocode.py b/tests/test_geocode.py
|
|
9 |
index f108454..ca7a8e7 100644
|
|
10 |
--- a/tests/test_geocode.py
|
|
11 |
+++ b/tests/test_geocode.py
|
|
12 |
@@ -14,6 +14,7 @@ from .util import unittest
|
|
13 |
|
|
14 |
def _skip_if_no_geopy():
|
|
15 |
try:
|
|
16 |
+ raise nose.SkipTest("Skip Geopy tests on debian with no internet access")
|
|
17 |
import geopy
|
|
18 |
except ImportError:
|
|
19 |
raise nose.SkipTest("Geopy not installed. Skipping tests.")
|
|
0 |
0001-Skip-tests-if-building-on-debian-no-internet.patch
|
1 | 1 |
|
2 | 2 |
export PYBUILD_NAME=geopandas
|
3 | 3 |
export PYBUILD_TEST_NOSE=1
|
4 | |
#Disable tests using geocoding -> does not work offline
|
5 | |
export PYBUILD_BEFORE_TEST=mv {dir}/tests/test_geocode.py {dir}/tests/test_geocode.disabled ||true
|
6 | |
export PYBUILD_AFTER_TEST=mv {dir}/tests/test_geocode.disabled {dir}/tests/test_geocode.py ||true
|
7 | 4 |
|
8 | 5 |
%:
|
9 | 6 |
dh $@ --with python2,python3,sphinxdoc --buildsystem pybuild
|