Skip to content

Commit

Permalink
Another bad file test that requires unix fs permission enforcement
Browse files Browse the repository at this point in the history
  • Loading branch information
benclifford committed Jun 10, 2024
1 parent d7312d1 commit b4d5d85
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions parsl/tests/test_bash_apps/test_stdout.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def echo_to_streams(msg, stderr=None, stdout=None):
whitelist = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'configs', '*threads*')

speclist = (
'/bad/dir/t.out',
['t3.out', 'w'],
('t4.out', None),
(42, 'w'),
Expand All @@ -26,7 +25,6 @@ def echo_to_streams(msg, stderr=None, stdout=None):
)

testids = [
'nonexistent_dir',
'list_not_tuple',
'null_mode',
'not_a_string',
Expand Down Expand Up @@ -54,6 +52,26 @@ def test_bad_stdout_specs(spec):
assert False, "Did not raise expected exception"


@pytest.mark.issue3328
@pytest.mark.unix_filesystem_permissions_required
def test_bad_stdout_file():
"""Testing bad stderr file"""

o = "/bad/dir/t2.out"

fn = echo_to_streams("Hello world", stdout=o, stderr='t.err')

try:
fn.result()
except perror.BadStdStreamFile:
pass
else:
assert False, "Did not raise expected exception BadStdStreamFile"

return



@pytest.mark.issue3328
@pytest.mark.unix_filesystem_permissions_required
def test_bad_stderr_file():
Expand Down

0 comments on commit b4d5d85

Please sign in to comment.