parent
7584bd6ab7
commit
2f832ef623
@ -0,0 +1,37 @@
|
|||||||
|
From 3e183cd71f8588a2b5d0958aa09d1b8dcb0eb86d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Yves Chibon <pingou@pingoured.fr>
|
||||||
|
Date: Tue, 24 Jan 2012 20:29:13 +0100
|
||||||
|
Subject: [PATCH] Skip test if it can not join the network
|
||||||
|
|
||||||
|
---
|
||||||
|
test/test_n3.py | 7 ++++++-
|
||||||
|
1 files changed, 6 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/test_n3.py b/test/test_n3.py
|
||||||
|
index 2fa54af..c419acf 100644
|
||||||
|
--- test/test_n3.py
|
||||||
|
+++ test/test_n3.py
|
||||||
|
@@ -60,6 +60,7 @@ n3:context a rdf:Property; rdfs:domain n3:statement;
|
||||||
|
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
+from urllib2 import URLError
|
||||||
|
|
||||||
|
from rdflib.graph import Graph, ConjunctiveGraph
|
||||||
|
|
||||||
|
@@ -160,7 +161,11 @@ foo-bar:Ex foo-bar:name "Test" . """
|
||||||
|
|
||||||
|
def testParse(self):
|
||||||
|
g = ConjunctiveGraph()
|
||||||
|
- g.parse("http://groups.csail.mit.edu/dig/2005/09/rein/examples/troop42-policy.n3", format="n3")
|
||||||
|
+ try:
|
||||||
|
+ g.parse("http://groups.csail.mit.edu/dig/2005/09/rein/examples/troop42-policy.n3", format="n3")
|
||||||
|
+ except URLError:
|
||||||
|
+ from nose import SkipTest
|
||||||
|
+ raise SkipTest('No network to retrieve the information, skipping test')
|
||||||
|
|
||||||
|
cases = ['no quotes',
|
||||||
|
"single ' quote",
|
||||||
|
--
|
||||||
|
1.7.7.6
|
||||||
|
|
Loading…
Reference in new issue