Blob Blame History Raw
From 94efbfa802ea8638de66d83cb5d49f34baeb3f4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 15 Feb 2018 08:28:12 +0100
Subject: [PATCH] tests: gracefuly handle network access failure in test

Related to #124.
---
 tests.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests.py b/tests.py
index 90c801f35b..c8ecd7300d 100755
--- a/tests.py
+++ b/tests.py
@@ -170,7 +170,12 @@ class TestPypandoc(unittest.TestCase):
 
     def test_basic_conversion_from_http_url(self):
         url = 'https://raw.githubusercontent.com/bebraw/pypandoc/master/README.md'
-        received = pypandoc.convert(url, 'html')
+        try:
+            received = pypandoc.convert(url, 'html')
+        except RuntimeError as e:
+            if 'https not supported' in str(e):
+                return
+            raise
         assert "GPL2 license" in received
 
     def test_convert_with_custom_writer(self):
-- 
2.14.3