diff options
author | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2018-10-30 11:29:55 +0100 |
---|---|---|
committer | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2018-10-30 11:29:55 +0100 |
commit | 668de4f52f490b13345030f215a2b44595fa0038 (patch) | |
tree | e253dbf4d3d2a0a9151b9015a544b045a8d286a0 | |
parent | 7abed6165d4ad235d41d1ddfb9dbbc2c64d6df0b (diff) | |
download | rdflib-668de4f52f490b13345030f215a2b44595fa0038.tar.gz |
cleanup test-skipping
mainly remove old skips for pypy/java
-rw-r--r-- | test/test_conventions.py | 10 | ||||
-rw-r--r-- | test/test_core_sparqlstore.py | 7 | ||||
-rw-r--r-- | test/test_datetime.py | 4 | ||||
-rw-r--r-- | test/test_finalnewline.py | 6 | ||||
-rw-r--r-- | test/test_issue084.py | 12 | ||||
-rw-r--r-- | test/test_issue160.py | 5 | ||||
-rw-r--r-- | test/test_issue190.py | 2 | ||||
-rw-r--r-- | test/test_issue248.py | 1 | ||||
-rw-r--r-- | test/test_issue363.py | 1 | ||||
-rw-r--r-- | test/test_n3_suite.py | 1 | ||||
-rw-r--r-- | test/test_nt_suite.py | 14 | ||||
-rw-r--r-- | test/test_sparqlstore.py | 5 |
12 files changed, 6 insertions, 62 deletions
diff --git a/test/test_conventions.py b/test/test_conventions.py index 307b79b9..2bd858a2 100644 --- a/test/test_conventions.py +++ b/test/test_conventions.py @@ -27,7 +27,7 @@ class A(unittest.TestCase): for importer, name, ispkg in pkgutil.iter_modules([path]): if ispkg: - result = self.module_names(path=os.path.join(path, name), + result = self.module_names(path=os.path.join(path, name), names=names) names.union(result) else: @@ -39,13 +39,5 @@ class A(unittest.TestCase): names = self.module_names() self.assertTrue(names==set(), "module names '%s' are not lower case" % names) -try: - getattr(pkgutil, 'iter_modules') -except AttributeError: - from nose import SkipTest - raise SkipTest('pkgutil.iter_modules not available in Python 2.4') - - if __name__ == "__main__": unittest.main() - diff --git a/test/test_core_sparqlstore.py b/test/test_core_sparqlstore.py index e7f0c097..83bf2e94 100644 --- a/test/test_core_sparqlstore.py +++ b/test/test_core_sparqlstore.py @@ -1,13 +1,6 @@ import unittest -try: - import SPARQLWrapper -except ImportError: - from nose.exc import SkipTest - raise SkipTest("SPARQLWrapper not installed") - from rdflib.graph import Graph - class TestSPARQLStoreGraphCore(unittest.TestCase): store_name = 'SPARQLStore' diff --git a/test/test_datetime.py b/test/test_datetime.py index 3d4b2abc..d4c5ab3d 100644 --- a/test/test_datetime.py +++ b/test/test_datetime.py @@ -19,10 +19,6 @@ class TestRelativeBase(unittest.TestCase): self.assertEqual(x == x, True) def test_microseconds(self): - import platform - if platform.system() == 'Java' or (platform.system() != 'Java' and sys.version_info[:2] == (2, 5)): - from nose import SkipTest - raise SkipTest('datetime microseconds unsupported in Python2.5 and Jython') dt1 = datetime(2009, 6, 15, 23, 37, 6, 522630) l = Literal(dt1) diff --git a/test/test_finalnewline.py b/test/test_finalnewline.py index 2c3b9a6b..733b490c 100644 --- a/test/test_finalnewline.py +++ b/test/test_finalnewline.py @@ -9,12 +9,6 @@ def testFinalNewline(): http://code.google.com/p/rdflib/issues/detail?id=5 """ import sys - import platform - if getattr(sys, 'pypy_version_info', None) or platform.system() == 'Java': - from nose import SkipTest - raise SkipTest( - 'Testing under pypy and Jython2.5 fails to detect that ' + \ - 'IOMemory is a context_aware store') graph=ConjunctiveGraph() graph.add((URIRef("http://ex.org/a"), diff --git a/test/test_issue084.py b/test/test_issue084.py index 88f2faa4..8775fd0a 100644 --- a/test/test_issue084.py +++ b/test/test_issue084.py @@ -86,10 +86,6 @@ rdfxml_reader = getreader('utf-8')(BytesIO(rdfxml.encode('utf-8'))) def test_xml_a(): """Test reading XML from a unicode object as data""" - import platform - if platform.system() == 'Java': - from nose import SkipTest - raise SkipTest('unicode issue for Jython2.5') g = Graph() g.parse(data=rdfxml, format='xml') v = g.value(subject=URIRef("http://www.test.org/#CI"), predicate=URIRef("http://www.w3.org/2004/02/skos/core#prefLabel")) @@ -97,10 +93,6 @@ def test_xml_a(): def test_xml_b(): """Test reading XML from a utf8 encoded string object as data""" - import platform - if platform.system() == 'Java': - from nose import SkipTest - raise SkipTest('unicode issue for Jython2.5') g = Graph() g.parse(data=rdfxml_utf8, format='xml') v = g.value(subject=URIRef("http://www.test.org/#CI"), predicate=URIRef("http://www.w3.org/2004/02/skos/core#prefLabel")) @@ -123,10 +115,6 @@ def test_xml_b(): def test_xml_e(): """Test reading XML from a BytesIO created from utf8 encoded string""" - import platform - if platform.system() == 'Java': - from nose import SkipTest - raise SkipTest('unicode issue for Jython2.5') g = Graph() g.parse(source=BytesIO(rdfxml_utf8), format='xml') v = g.value(subject=URIRef("http://www.test.org/#CI"), predicate=URIRef("http://www.w3.org/2004/02/skos/core#prefLabel")) diff --git a/test/test_issue160.py b/test/test_issue160.py index ddb446e5..304f1605 100644 --- a/test/test_issue160.py +++ b/test/test_issue160.py @@ -2,9 +2,6 @@ from unittest import TestCase from rdflib import ConjunctiveGraph from rdflib import Namespace, Literal from rdflib.collection import Collection -from nose.exc import SkipTest - - target1xml = """\ <?xml version="1.0" encoding="utf-8"?> @@ -78,5 +75,3 @@ class CollectionTest(TestCase): # resxml = g.serialize(format="pretty-xml") # # print(resxml) # self.assertEqual(g.isomorphic(target2), True) - - diff --git a/test/test_issue190.py b/test/test_issue190.py index a95b45d9..3825f884 100644 --- a/test/test_issue190.py +++ b/test/test_issue190.py @@ -52,4 +52,4 @@ def test2(): graph.parse(StringInputSource(prefix + '<http://example.org/>' + meta2), format='n3') from nose import SkipTest -raise SkipTest("Known issue, with newlines in text")
\ No newline at end of file +raise SkipTest("Known issue, with newlines in text") diff --git a/test/test_issue248.py b/test/test_issue248.py index 252b8a17..f2b984fa 100644 --- a/test/test_issue248.py +++ b/test/test_issue248.py @@ -1,5 +1,4 @@ import rdflib -from nose.exc import SkipTest import unittest diff --git a/test/test_issue363.py b/test/test_issue363.py index 90f82844..1f7cfca7 100644 --- a/test/test_issue363.py +++ b/test/test_issue363.py @@ -1,5 +1,4 @@ import rdflib -from nose import SkipTest from nose.tools import assert_raises data = '''<?xml version="1.0" encoding="utf-8"?> diff --git a/test/test_n3_suite.py b/test/test_n3_suite.py index 61d9b8ad..fd1a86cf 100644 --- a/test/test_n3_suite.py +++ b/test/test_n3_suite.py @@ -8,7 +8,6 @@ except: def _get_test_files_formats(): skiptests = [ - 'strquot.n3', ] for f in os.listdir('test/n3'): if f not in skiptests: diff --git a/test/test_nt_suite.py b/test/test_nt_suite.py index 4aa28846..f2e4477b 100644 --- a/test/test_nt_suite.py +++ b/test/test_nt_suite.py @@ -19,9 +19,9 @@ def _get_test_files_formats(): yield fpath, 'nt' def all_nt_files(): - skiptests = [ + skiptests = [ # illegal literal as subject - 'test/nt/literals-01.nt', + 'test/nt/literals-01.nt', 'test/nt/keywords-08.nt', 'test/nt/paths-04.nt', 'test/nt/numeric-01.nt', @@ -39,20 +39,14 @@ def all_nt_files(): 'test/nt/formulae-10.nt', # illegal bnode as predicate - 'test/nt/paths-06.nt', + 'test/nt/paths-06.nt', 'test/nt/anons-02.nt', - 'test/nt/anons-03.nt', + 'test/nt/anons-03.nt', 'test/nt/qname-01.nt', 'test/nt/lists-06.nt', ] - [ - 'test/nt/literals-02.nt', # this should work - 'test/nt/literals-05.nt', # this should work - 'test/nt/rdflibtest05.nt', # this should work - ] for fpath, fmt in _get_test_files_formats(): if fpath in skiptests: log.debug("Skipping %s, known issue" % fpath) else: yield fpath, fmt - diff --git a/test/test_sparqlstore.py b/test/test_sparqlstore.py index 8e963971..8eca00e6 100644 --- a/test/test_sparqlstore.py +++ b/test/test_sparqlstore.py @@ -2,11 +2,6 @@ import os import unittest from nose import SkipTest -try: - import SPARQLWrapper -except ImportError: - raise SkipTest("SPARQLWrapper not installed") - if os.getenv("TRAVIS"): raise SkipTest("Doesn't work in travis") |