Skip to content

Commit

Permalink
test excel has two variants
Browse files Browse the repository at this point in the history
  • Loading branch information
iskandr committed May 10, 2024
1 parent 74fcfd5 commit 4b59be9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jinja2<3.1
pdfkit # needs wkhtmltopdf: brew install Caskroom/cask/wkhtmltopdf
pypandoc # needs pandoc: brew install pandoc
shellinford>=0.3.4
xlsxwriter
xlrd>=1.0.0,<2.0.0
openpyxl
xvfbwrapper
future>=0.16.0 # needed by pylint
astropy
Expand Down
13 changes: 7 additions & 6 deletions tests/test_shell_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
from tempfile import NamedTemporaryFile

import pandas as pd
# TODO: change this to use openpyxl
from xlrd import open_workbook


from vaxrank.cli import main as run_shell_script

Expand Down Expand Up @@ -113,12 +112,14 @@ def test_isovar_csv():

def test_xlsx_report():
with NamedTemporaryFile(mode="r") as f:

xlsx_args = cli_args_for_b16_seqdata + ["--output-xlsx-report", f.name]
run_shell_script(xlsx_args)
book = open_workbook(f.name)
assert book.nsheets > 1


print("vaxrank %s" % (" ".join(xlsx_args)))
run_shell_script(xlsx_args)
df = pd.read_excel(f.name, engine='openpyxl')
assert len(df) == 2



def test_html_report():
Expand Down

0 comments on commit 4b59be9

Please sign in to comment.