| 1 |
--- a/test/io/testccio.py |
| 2 |
+++ b/test/io/testccio.py |
| 3 |
@@ -93,6 +93,8 @@ |
| 4 |
with tempfile.NamedTemporaryFile() as tf: |
| 5 |
self.assertIsInstance(self.ccopen(tf.name, cjson=True), cclib.io.cjsonreader.CJSON) |
| 6 |
|
| 7 |
+ @unittest.skipIf(os.environ.get('CCLIB_SKIP_NETWORK_TESTS', False), |
| 8 |
+ "Skipping network tests") |
| 9 |
def test_url_io(self): |
| 10 |
"""Does the function works with URLs such good as with filenames?""" |
| 11 |
fpath = os.path.join(__datadir__, "data") |
| 12 |
@@ -102,6 +104,8 @@ |
| 13 |
self.assertEqual(self.ccopen(os.path.join(fpath, fname), quiet=True).parse().getattributes(tolists=True), |
| 14 |
self.ccopen(base_url + fname, quiet=True).parse().getattributes(tolists=True)) |
| 15 |
|
| 16 |
+ @unittest.skipIf(os.environ.get('CCLIB_SKIP_NETWORK_TESTS', False), |
| 17 |
+ "Skipping network tests") |
| 18 |
def test_multi_url_io(self): |
| 19 |
"""Does the function works with multiple URLs such good as with multiple filenames?""" |
| 20 |
fpath = os.path.join(__datadir__, "data") |
| 21 |
--- a/test/parser/testlogfileparser.py |
| 22 |
+++ b/test/parser/testlogfileparser.py |
| 23 |
@@ -41,6 +41,8 @@ |
| 24 |
wrapper.seek(0, 2) |
| 25 |
self.assertEqual(wrapper.pos, wrapper.size) |
| 26 |
|
| 27 |
+ @unittest.skipIf(os.environ.get('CCLIB_SKIP_NETWORK_TESTS', False), |
| 28 |
+ "Skipping network tests") |
| 29 |
def test_url_seek(self): |
| 30 |
"""Can we seek only to the end of an url stream?""" |
| 31 |
|