--- a/test/io/testccio.py +++ b/test/io/testccio.py @@ -93,6 +93,8 @@ with tempfile.NamedTemporaryFile() as tf: self.assertIsInstance(self.ccopen(tf.name, cjson=True), cclib.io.cjsonreader.CJSON) + @unittest.skipIf(os.environ.get('CCLIB_SKIP_NETWORK_TESTS', False), + "Skipping network tests") def test_url_io(self): """Does the function works with URLs such good as with filenames?""" fpath = os.path.join(__datadir__, "data") @@ -102,6 +104,8 @@ self.assertEqual(self.ccopen(os.path.join(fpath, fname), quiet=True).parse().getattributes(tolists=True), self.ccopen(base_url + fname, quiet=True).parse().getattributes(tolists=True)) + @unittest.skipIf(os.environ.get('CCLIB_SKIP_NETWORK_TESTS', False), + "Skipping network tests") def test_multi_url_io(self): """Does the function works with multiple URLs such good as with multiple filenames?""" fpath = os.path.join(__datadir__, "data") --- a/test/parser/testlogfileparser.py +++ b/test/parser/testlogfileparser.py @@ -41,6 +41,8 @@ wrapper.seek(0, 2) self.assertEqual(wrapper.pos, wrapper.size) + @unittest.skipIf(os.environ.get('CCLIB_SKIP_NETWORK_TESTS', False), + "Skipping network tests") def test_url_seek(self): """Can we seek only to the end of an url stream?"""