Skip to content

Commit

Permalink
add copy + dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lldelisle committed May 8, 2024
1 parent 02ac7cf commit b19cfa4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions baredSC/tests/test_baredSC_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from tempfile import NamedTemporaryFile
import os.path
import shutil
import matplotlib as mpl
from matplotlib.testing.compare import compare_images
import baredSC.baredSC_1d
Expand Down Expand Up @@ -55,6 +56,14 @@ def test_baredSC_1d_2gauss_log_pdf():
baredSC.baredSC_1d.main(args)
for suffix in BARED_1D_IMAGES_SUFFIX:
expected_file = f'{expected}{suffix}.{extension}'
# matplotlib compare on pdf will create a png next to it.
# To avoid issues related to write in test_data folder
# We copy the expected file into a temporary place
new_expected_file = NamedTemporaryFile(suffix='.pdf',
prefix='pyGenomeTracks_test_',
delete=False)
shutil.copy(expected_file, new_expected_file.name)
expected_file = new_expected_file.name
obtained_file = f'{outfig_base}{suffix}.{extension}'
res = compare_images(expected_file,
obtained_file, TOLERENCE)
Expand Down
4 changes: 3 additions & 1 deletion baredSC_dev_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ dependencies:
- sphinx-argparse # For the doc
- build # For the upload
- twine # For the upload
- pytest
- pytest # For the tests
- nose # For the tests
- ghostscript # For the tests
- pip
- pip:
- sphinx-autorun # For the doc

0 comments on commit b19cfa4

Please sign in to comment.