def test_catch_bad_stdin_stdout_requests_source_is_dest(tmpdir, source_is_symlink, dest_is_symlink, use_files): source, dest = build_same_files_and_dirs(tmpdir, source_is_symlink, dest_is_symlink, use_files) with pytest.raises(BadUserArgumentError) as excinfo: aws_encryption_sdk_cli._catch_bad_stdin_stdout_requests(source, dest) excinfo.match(r"Destination and source cannot be the same")
def test_catch_bad_stdin_stdout_requests_same_pipe(): aws_encryption_sdk_cli._catch_bad_stdin_stdout_requests("-", "-")
def test_catch_bad_stdin_stdout_requests_stdin_dir(tmpdir): with pytest.raises(BadUserArgumentError) as excinfo: aws_encryption_sdk_cli._catch_bad_stdin_stdout_requests( "-", str(tmpdir)) excinfo.match(r"Destination may not be a directory when source is stdin")