Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Permalink
Browse files

Add test mark for tests affected by #363 (#1377)

Tests which inspect stdout/stderr cannot always expect
to find the stdout/stderr files on the submitting file
system. That is issue #363

This commit adds @pytest.mark.issue363, so that
pytest can be invoked with parameter:

   -k 'not issue363'

which skips tests affected in that way.

I have tested this with the AWS provider (as part of a
set of various other AWS test fixes and local configs).
  • Loading branch information...
benclifford authored and yadudoc committed Oct 24, 2019
1 parent 5a4b36d commit 7a9346deb377b2d47a0672b8c70843100a76263f
@@ -64,6 +64,10 @@ making FTP transfers). Travis does not provide a sufficiently clean
network and so .travis.yml runs all tests with ``-k "not cleannet"`` to
disable those tests.

A pytest marker of ``issue363`` can be used to select or deselect tests
that will fail because of issue 363 when running without a shared file
system.

Some other markers are available but unused in travis testing;
see ``pytest --markers parsl/tests/`` for more details.

@@ -63,6 +63,10 @@ def pytest_configure(config):
'markers',
'cleannet: Enable tests that require a clean network connection (such as for testing FTP)'
)
config.addinivalue_line(
'markers',
'issue363: Marks tests that require a shared filesystem for stdout/stderr - see issue #363'
)


@pytest.fixture(scope='session')
@@ -1,5 +1,6 @@
import argparse
import os
import pytest
import shutil
import time

@@ -24,6 +25,7 @@ def foo(x, y, z=10, stdout=None):
""".format(x, y, z=z)


@pytest.mark.issue363
def test_command_format_1():
"""Testing command format for BashApps
"""
@@ -51,6 +53,7 @@ def test_command_format_1():
return True


@pytest.mark.issue363
def test_parallel_for(n=3):
"""Testing a simple parallel for loop
"""
@@ -103,6 +103,7 @@ def test_div_0(test_fn=div_0):
return True


@pytest.mark.issue363
def test_bash_misuse(test_fn=bash_misuse):
err_code = test_matrix[test_fn]['exit_code']
f = test_fn()
@@ -117,6 +118,7 @@ def test_bash_misuse(test_fn=bash_misuse):
os.remove('std.out')


@pytest.mark.issue363
def test_command_not_found(test_fn=command_not_found):
err_code = test_matrix[test_fn]['exit_code']
f = test_fn()
@@ -1,5 +1,6 @@
import argparse
import os
import pytest
import shutil
import time

@@ -22,6 +23,7 @@ def multiline(
""".format(inputs=inputs, outputs=outputs)


@pytest.mark.issue363
def test_multiline():

outdir = os.path.abspath('outputs')
@@ -37,6 +37,7 @@ def echo_to_streams(msg, stderr='std.err', stdout='std.out'):
]


@pytest.mark.issue363
@pytest.mark.parametrize('spec', speclist, ids=testids)
def test_bad_stdout_specs(spec):
"""Testing bad stdout spec cases
@@ -55,6 +56,7 @@ def test_bad_stdout_specs(spec):
return


@pytest.mark.issue363
def test_bad_stderr_file():

""" Testing bad stderr file """
@@ -75,6 +77,7 @@ def test_bad_stderr_file():
return


@pytest.mark.issue363
def test_stdout_truncate():

""" Testing truncation of prior content of stdout """
@@ -94,6 +97,7 @@ def test_stdout_truncate():
os.system('rm -f ' + out[0] + ' ' + err)


@pytest.mark.issue363
def test_stdout_append():

""" Testing appending to prior content of stdout (default open() mode) """
@@ -17,6 +17,7 @@ def cat(inputs=[], outputs=[], stdout=None, stderr=None):


@pytest.mark.usefixtures('setup_data')
@pytest.mark.issue363
def test_files():

if os.path.exists('cat_out.txt'):
@@ -16,6 +16,7 @@ def cat(inputs=[], outputs=[], stdout=None, stderr=None):


@pytest.mark.usefixtures('setup_data')
@pytest.mark.issue363
def test_files():

if os.path.exists('cat_out.txt'):

0 comments on commit 7a9346d

Please sign in to comment.
You can’t perform that action at this time.