From 4b59be9cc8813de902171b94f5ba1e64c7247eb3 Mon Sep 17 00:00:00 2001 From: Alex Rubinsteyn Date: Fri, 10 May 2024 00:35:45 -0400 Subject: [PATCH] test excel has two variants --- requirements.txt | 3 +-- tests/test_shell_script.py | 13 +++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0f594da..1c4be79 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/tests/test_shell_script.py b/tests/test_shell_script.py index 1dd581c..b8446f6 100644 --- a/tests/test_shell_script.py +++ b/tests/test_shell_script.py @@ -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 @@ -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():