Skip to content

Commit d9a1fe4

Browse files
committed
Change to only affect windows
1 parent 6c51471 commit d9a1fe4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/test_importers/test_rdfs_importer.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# -*- coding: utf-8 -*-
22

3-
"""Test the module can be imported."""
3+
# Monkey patching jsonobj to fix windows issue
4+
import platform
5+
6+
if platform.system() == "Windows":
7+
from jsonasobj2 import JsonObj
8+
if not hasattr(JsonObj, 'values'):
9+
def _values(self):
10+
return dict(self).values()
11+
JsonObj.values = _values
12+
413

514
from io import StringIO
615
import unittest
@@ -20,7 +29,6 @@
2029
OUTSCHEMA = os.path.join(OUTPUT_DIR, 'reproschema-from-ttl.yaml')
2130
FOAF = os.path.join(INPUT_DIR, 'foaf_snippet.ttl')
2231

23-
2432
def test_import_foaf():
2533
engine = RdfsImportEngine()
2634
schema = engine.convert(FOAF)

0 commit comments

Comments
 (0)