|
1 |
| -from __future__ import absolute_import |
2 |
| - |
3 | 1 | import os
|
4 | 2 | import sys
|
5 |
| -import unittest |
6 | 3 |
|
7 | 4 | from cwltool.main import main
|
8 | 5 | from cwltool.utils import subprocess
|
9 | 6 |
|
10 | 7 | from .util import get_data
|
11 | 8 |
|
12 | 9 |
|
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 |
20 | 12 |
|
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: |
23 | 16 | lc_all = os.environ.get("LC_ALL", None)
|
24 | 17 | 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: |
28 | 25 | if lc_all:
|
29 | 26 | os.environ["LC_ALL"] = lc_all
|
0 commit comments