Skip to content

Commit 24723b1

Browse files
committed
maintenance: remove unittest from test_rdfprint
1 parent b115386 commit 24723b1

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

tests/test_rdfprint.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1-
from __future__ import absolute_import
2-
31
import os
42
import sys
5-
import unittest
63

74
from cwltool.main import main
85
from cwltool.utils import subprocess
96

107
from .util import get_data
118

129

13-
class RDFPrint(unittest.TestCase):
14-
""" Test `cwltool --print-rdf`. """
15-
16-
def test_rdf_print(self):
17-
"""Basic test of --print-rdf."""
18-
self.assertEqual(main(['--print-rdf',
19-
get_data('tests/wf/hello_single_tool.cwl')]), 0)
10+
def test_rdf_print():
11+
assert main(['--print-rdf', get_data('tests/wf/hello_single_tool.cwl')]) == 0
2012

21-
def test_rdf_print_unicode(self):
22-
"""Force ASCII encoding but load UTF file with --print-rdf."""
13+
def test_rdf_print_unicode():
14+
"""Force ASCII encoding but load UTF file with --print-rdf."""
15+
try:
2316
lc_all = os.environ.get("LC_ALL", None)
2417
os.environ["LC_ALL"] = "C"
25-
self.assertEqual(subprocess.check_call(
26-
[sys.executable, "-m", "cwltool", '--print-rdf',
27-
get_data('tests/utf_doc_example.cwl')]), 0)
18+
19+
params = [sys.executable,
20+
"-m", "cwltool", '--print-rdf',
21+
get_data('tests/utf_doc_example.cwl')]
22+
23+
assert subprocess.check_call(params) == 0
24+
finally:
2825
if lc_all:
2926
os.environ["LC_ALL"] = lc_all

0 commit comments

Comments
 (0)