summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoern Hees <dev@joernhees.de>2016-01-28 11:04:53 +0100
committerJoern Hees <dev@joernhees.de>2016-01-28 11:04:53 +0100
commit0f32900e95b4073751266555d9c98f51510f8c21 (patch)
tree8cb0ec993d8c0bf5c05986e0311e2f8f3a805436
parentbe4137915a8a48f5ffc5adea73ce3834a4a945ef (diff)
downloadrdflib-microdata-to-rdf-third-edition.tar.gz
some whitespace cleanupmicrodata-to-rdf-third-edition
-rw-r--r--test/test_issue375.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/test_issue375.py b/test/test_issue375.py
index 563f7ba8..9ef08720 100644
--- a/test/test_issue375.py
+++ b/test/test_issue375.py
@@ -121,6 +121,7 @@ mdata_expected = u'''
env = os.environ.copy()
env['PYTHONPATH'] = '.:' + env.get('PYTHONPATH', '')
+
def test_rdfpipe_bytes_vs_str():
"""
Issue 375: rdfpipe command generates bytes vs. str TypeError
@@ -129,14 +130,19 @@ def test_rdfpipe_bytes_vs_str():
explicitly exposes sys.stdout.buffer for this purpose. Test
rdfpipe to ensure that we get the expected results.
"""
- args = ['python', 'rdflib/tools/rdfpipe.py', '-i', 'rdfa1.1', 'test/rdfa/oreilly.html']
- proc = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines=True, env=env)
+ args = [
+ 'python', 'rdflib/tools/rdfpipe.py', '-i', 'rdfa1.1',
+ 'test/rdfa/oreilly.html'
+ ]
+ proc = subprocess.Popen(
+ args, stdout=subprocess.PIPE, universal_newlines=True, env=env)
res = ''
while proc.poll() is None:
res += proc.stdout.read()
assert res.strip() == rdfa_expected
+
def test_rdfpipe_mdata_open():
"""
Issue 375: rdfa1.1 and mdata processors used file() builtin
@@ -144,8 +150,12 @@ def test_rdfpipe_mdata_open():
The file() builtin has been deprecated for a long time. Use
the open() builtin instead.
"""
- args = ['python', 'rdflib/tools/rdfpipe.py', '-i', 'mdata', 'test/mdata/codelab.html']
- proc = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines=True, env=env)
+ args = [
+ 'python', 'rdflib/tools/rdfpipe.py', '-i', 'mdata',
+ 'test/mdata/codelab.html'
+ ]
+ proc = subprocess.Popen(
+ args, stdout=subprocess.PIPE, universal_newlines=True, env=env)
res_abs = ''
while proc.poll() is None:
res_abs += proc.stdout.read()