Skip to content

Commit 583b87b

Browse files
committed
ignoring tests that use docker on Windows(Appveyor)
1 parent 2a190da commit 583b87b

File tree

6 files changed

+24
-8
lines changed

6 files changed

+24
-8
lines changed

tests/test_check.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
import cwltool.pathmapper
77
import cwltool.process
88
import cwltool.workflow
9+
import pytest
910
from cwltool.main import main
1011

11-
from .util import get_data
12+
from .util import get_data, onWindows
1213

1314

1415
class TestCheck(unittest.TestCase):
16+
@pytest.mark.skipif(onWindows(),
17+
reason="Instance of Cwltool is used, On windows that invoke a default docker Container")
1518
def test_output_checking(self):
1619
self.assertEquals(main([get_data('tests/wf/badout1.cwl')]), 1)
1720
self.assertEquals(main([get_data('tests/wf/badout2.cwl')]), 1)

tests/test_ext.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
import cwltool.workflow
1313
from cwltool.main import main
1414

15-
from .util import get_data
15+
from .util import get_data, onWindows
1616

1717

18+
@pytest.mark.skipif(onWindows(),
19+
reason="Instance of Cwltool is used, On windows that invoke a default docker Container")
1820
class TestListing(unittest.TestCase):
1921
def test_missing_enable_ext(self):
2022
# Require that --enable-ext is provided.
@@ -41,7 +43,7 @@ def test_listing_v1_0(self):
4143
# # Default behavior in 1.1 will be no expansion
4244
# self.assertEquals(main([get_data('tests/wf/listing_v1_1.cwl'), get_data('tests/listing-job.yml')]), 1)
4345

44-
@pytest.mark.skipif(os.name == 'nt',
46+
@pytest.mark.skipif(onWindows(),
4547
reason="InplaceUpdate uses symlinks,does not run on windows without admin privileges")
4648
class TestInplaceUpdate(unittest.TestCase):
4749

tests/test_fetch.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ def fetch_text(self, url): # type: (unicode) -> unicode
3030
else:
3131
raise RuntimeError("Not foo.cwl")
3232

33-
def urljoin(self, base_url, url): # type: (Text, Text) -> Text
34-
return urlparse.urljoin(base_url, url)
35-
3633
def check_exists(self, url): # type: (unicode) -> bool
3734
if url == "baz:bar/foo.cwl":
3835
return True

tests/test_relax_path_checks.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from __future__ import absolute_import
22
import unittest
3+
import pytest
34
from tempfile import NamedTemporaryFile
4-
5+
from .util import onWindows
56
from cwltool.main import main
67

78

@@ -24,6 +25,8 @@ class ToolArgparse(unittest.TestCase):
2425
baseCommand: [cat]
2526
'''
2627

28+
@pytest.mark.skipif(onWindows(),
29+
reason="Instance of Cwltool is used, On windows that invoke a default docker Container")
2730
def test_spaces_in_input_files(self):
2831
with NamedTemporaryFile(mode='w', delete=False) as f:
2932
f.write(self.script)

tests/test_toolargparse.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from __future__ import absolute_import
22
import unittest
3+
import pytest
34
from tempfile import NamedTemporaryFile
45

56
from cwltool.main import main
67

7-
from .util import get_data
8+
from .util import get_data, onWindows
89

910

1011
class ToolArgparse(unittest.TestCase):
@@ -65,6 +66,8 @@ class ToolArgparse(unittest.TestCase):
6566
outputs: []
6667
'''
6768

69+
@pytest.mark.skipif(onWindows(),
70+
reason="Instance of Cwltool is used, On windows that invoke a default docker Container")
6871
def test_help(self):
6972
with NamedTemporaryFile(mode='w', delete=False) as f:
7073
f.write(self.script)
@@ -75,6 +78,9 @@ def test_help(self):
7578
self.assertEquals(main(["--debug", f.name, '--input',
7679
get_data('tests/echo.cwl')]), 0)
7780

81+
82+
@pytest.mark.skipif(onWindows(),
83+
reason="Instance of Cwltool is used, On windows that invoke a default docker Container")
7884
def test_bool(self):
7985
with NamedTemporaryFile(mode='w', delete=False) as f:
8086
f.write(self.script2)

tests/util.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ def get_data(filename):
1717
if not filepath or not os.path.isfile(filepath):
1818
filepath = os.path.join(os.path.dirname(__file__), os.pardir, filename)
1919
return filepath
20+
21+
# Check if we are on windows OS
22+
def onWindows():
23+
# type: () -> (bool)
24+
return os.name == 'nt'

0 commit comments

Comments
 (0)