Skip to content

Commit

Permalink
Add test for binary log file issue
Browse files Browse the repository at this point in the history
This replicates snakemake#2826

Unfortunately this test seems to currently crush the pytest test execution
  • Loading branch information
Vito Zanotelli committed Apr 19, 2024
1 parent 8465818 commit d9bb2d7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_issue2826_failed_binary_logs/Snakefile
@@ -0,0 +1,12 @@
rule:
log:
'log.bin'
run:
import pickle
with open(log[0], 'wb') as f:
# Write anything binary to the file
# that cannot be interpreted as unicode
# dumping the log object was an easy way to do this
pickle.dump(log, f)
# make this test fail
a
10 changes: 10 additions & 0 deletions tests/tests.py
Expand Up @@ -616,6 +616,16 @@ def test_dup_out_patterns():
run(dpath("test_dup_out_patterns"), shouldfail=True)


def test_issue2826_failed_binary_logs():
"""Show how a binary log file crushes `show_failed_logs`
The log file is a binary file. `show_failed_logs` is
the default option for `run` and should not fail despite the
binary log file.
"""
run(dpath("test_issue2826_failed_binary_logs"), shouldfail=True)


# TODO reactivate once generic cluster executor is properly released
# @skip_on_windows
# def test_restartable_job_cmd_exit_1_no_restart():
Expand Down

0 comments on commit d9bb2d7

Please sign in to comment.