Skip to content

Commit

Permalink
Fix data_fpath error
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjameskennedy committed Jan 2, 2024
1 parent 4b77020 commit 56a9da3
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 63 deletions.
58 changes: 29 additions & 29 deletions tests/fixtures/ecoli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,86 +8,86 @@


@pytest.fixture()
def ecoli_analysis_meta_path(data_fpath):
def ecoli_analysis_meta_path(data_path):
"""Get path for ecoli meta file"""
return str(data_fpath.joinpath("ecoli", "analysis_meta.json"))
return str(data_path.joinpath("ecoli", "analysis_meta.json"))


@pytest.fixture()
def ecoli_bwa_path(data_fpath):
def ecoli_bwa_path(data_path):
"""Get path for ecoli bwa qc file"""
return str(data_fpath.joinpath("ecoli", "bwa.qc"))
return str(data_path.joinpath("ecoli", "bwa.qc"))


@pytest.fixture()
def ecoli_quast_path(data_fpath):
def ecoli_quast_path(data_path):
"""Get path for ecoli quast file"""
return str(data_fpath.joinpath("ecoli", "quast.tsv"))
return str(data_path.joinpath("ecoli", "quast.tsv"))


@pytest.fixture()
def ecoli_amrfinder_path(data_fpath):
def ecoli_amrfinder_path(data_path):
"""Get path for ecoli amrfinder file"""
return str(data_fpath.joinpath("ecoli", "amrfinder.out"))
return str(data_path.joinpath("ecoli", "amrfinder.out"))


@pytest.fixture()
def ecoli_resfinder_path(data_fpath):
def ecoli_resfinder_path(data_path):
"""Get path for ecoli resfinder file"""
return str(data_fpath.joinpath("ecoli", "resfinder.json"))
return str(data_path.joinpath("ecoli", "resfinder.json"))


@pytest.fixture()
def ecoli_resfinder_meta_path(data_fpath):
def ecoli_resfinder_meta_path(data_path):
"""Get path for ecoli resfinder meta file"""
return str(data_fpath.joinpath("ecoli", "resfinder_meta.json"))
return str(data_path.joinpath("ecoli", "resfinder_meta.json"))


@pytest.fixture()
def ecoli_virulencefinder_wo_stx_path(data_fpath):
def ecoli_virulencefinder_wo_stx_path(data_path):
"""Get path for ecoli virulencefinder without stx file"""
return str(data_fpath.joinpath("ecoli", "virulencefinder.json"))
return str(data_path.joinpath("ecoli", "virulencefinder.json"))


@pytest.fixture()
def ecoli_virulencefinder_stx_pred_stx_path(data_fpath):
def ecoli_virulencefinder_stx_pred_stx_path(data_path):
"""Get path for ecoli stx prediction file"""
return str(data_fpath.joinpath("ecoli", "virulencefinder.stx_pred.stx.json"))
return str(data_path.joinpath("ecoli", "virulencefinder.stx_pred.stx.json"))


@pytest.fixture()
def ecoli_virulencefinder_stx_pred_no_stx_path(data_fpath):
def ecoli_virulencefinder_stx_pred_no_stx_path(data_path):
"""Get path for ecoli stx prediction no stx file"""
return str(data_fpath.joinpath("ecoli", "virulencefinder.stx_pred.no_stx.json"))
return str(data_path.joinpath("ecoli", "virulencefinder.stx_pred.no_stx.json"))


@pytest.fixture()
def ecoli_virulencefinder_meta_path(data_fpath):
def ecoli_virulencefinder_meta_path(data_path):
"""Get path for ecoli virulencefinder meta file"""
return str(data_fpath.joinpath("ecoli", "virulencefinder_meta.json"))
return str(data_path.joinpath("ecoli", "virulencefinder_meta.json"))


@pytest.fixture()
def ecoli_mlst_path(data_fpath):
def ecoli_mlst_path(data_path):
"""Get path for ecoli mlst file"""
return str(data_fpath.joinpath("ecoli", "mlst.json"))
return str(data_path.joinpath("ecoli", "mlst.json"))


@pytest.fixture()
def ecoli_chewbbaca_path(data_fpath):
def ecoli_chewbbaca_path(data_path):
"""Get path for ecoli chewbbaca file"""
return str(data_fpath.joinpath("ecoli", "chewbbaca.out"))
return str(data_path.joinpath("ecoli", "chewbbaca.out"))


@pytest.fixture()
def ecoli_bracken_path(data_fpath):
def ecoli_bracken_path(data_path):
"""Get path for ecoli bracken file"""
return str(data_fpath.joinpath("ecoli", "bracken.out"))
return str(data_path.joinpath("ecoli", "bracken.out"))


@pytest.fixture()
def ecoli_cdm_input(data_fpath):
def ecoli_cdm_input(data_path):
"""Get path for ecoli cdm file"""
path = data_fpath.joinpath("ecoli", "cdm_input.json")
with open(path) as inpt:
path = data_path.joinpath("ecoli", "cdm_input.json")
with open(path, "rb") as inpt:
return json.load(inpt)
24 changes: 12 additions & 12 deletions tests/fixtures/mtuberculosis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@


@pytest.fixture()
def mtuberculosis_analysis_meta_path(data_fpath):
def mtuberculosis_analysis_meta_path(data_path):
"""Get path for mtuberculosis meta file"""
return str(data_fpath.joinpath("mtuberculosis", "analysis_meta.json"))
return str(data_path.joinpath("mtuberculosis", "analysis_meta.json"))


@pytest.fixture()
def mtuberculosis_bracken_path(data_fpath):
def mtuberculosis_bracken_path(data_path):
"""Get path for mtuberculosis bracken file"""
return str(data_fpath.joinpath("mtuberculosis", "bracken.out"))
return str(data_path.joinpath("mtuberculosis", "bracken.out"))


@pytest.fixture()
def mtuberculosis_bwa_path(data_fpath):
def mtuberculosis_bwa_path(data_path):
"""Get path for mtuberculosis bwa qc file"""
return str(data_fpath.joinpath("mtuberculosis", "bwa.qc"))
return str(data_path.joinpath("mtuberculosis", "bwa.qc"))


@pytest.fixture()
def mtuberculosis_mykrobe_path(data_fpath):
def mtuberculosis_mykrobe_path(data_path):
"""Get path for mtuberculosis mykrobe file"""
return str(data_fpath.joinpath("mtuberculosis", "mykrobe.csv"))
return str(data_path.joinpath("mtuberculosis", "mykrobe.csv"))


@pytest.fixture()
def mtuberculosis_quast_path(data_fpath):
def mtuberculosis_quast_path(data_path):
"""Get path for mtuberculosis quast file"""
return str(data_fpath.joinpath("mtuberculosis", "quast.tsv"))
return str(data_path.joinpath("mtuberculosis", "quast.tsv"))


@pytest.fixture()
def mtuberculosis_tbprofiler_path(data_fpath):
def mtuberculosis_tbprofiler_path(data_path):
"""Get path for mtuberculosis tbprofiler file"""
return str(data_fpath.joinpath("mtuberculosis", "tbprofiler.json"))
return str(data_path.joinpath("mtuberculosis", "tbprofiler.json"))
44 changes: 22 additions & 22 deletions tests/fixtures/saureus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,66 @@


@pytest.fixture()
def saureus_analysis_meta_path(data_fpath):
def saureus_analysis_meta_path(data_path):
"""Get path for saureus meta file"""
return str(data_fpath.joinpath("saureus", "analysis_meta.json"))
return str(data_path.joinpath("saureus", "analysis_meta.json"))


@pytest.fixture()
def saureus_bwa_path(data_fpath):
def saureus_bwa_path(data_path):
"""Get path for saureus bwa qc file"""
return str(data_fpath.joinpath("saureus", "bwa.qc"))
return str(data_path.joinpath("saureus", "bwa.qc"))


@pytest.fixture()
def saureus_quast_path(data_fpath):
def saureus_quast_path(data_path):
"""Get path for saureus quast file"""
return str(data_fpath.joinpath("saureus", "quast.tsv"))
return str(data_path.joinpath("saureus", "quast.tsv"))


@pytest.fixture()
def saureus_amrfinder_path(data_fpath):
def saureus_amrfinder_path(data_path):
"""Get path for saureus amrfinder file"""
return str(data_fpath.joinpath("saureus", "amrfinder.out"))
return str(data_path.joinpath("saureus", "amrfinder.out"))


@pytest.fixture()
def saureus_resfinder_path(data_fpath):
def saureus_resfinder_path(data_path):
"""Get path for saureus resfinder file"""
return str(data_fpath.joinpath("saureus", "resfinder.json"))
return str(data_path.joinpath("saureus", "resfinder.json"))


@pytest.fixture()
def saureus_resfinder_meta_path(data_fpath):
def saureus_resfinder_meta_path(data_path):
"""Get path for saureus resfinder meta file"""
return str(data_fpath.joinpath("saureus", "resfinder_meta.json"))
return str(data_path.joinpath("saureus", "resfinder_meta.json"))


@pytest.fixture()
def saureus_virulencefinder_path(data_fpath):
def saureus_virulencefinder_path(data_path):
"""Get path for saureus virulencefinder file"""
return str(data_fpath.joinpath("saureus", "virulencefinder.json"))
return str(data_path.joinpath("saureus", "virulencefinder.json"))


@pytest.fixture()
def saureus_virulencefinder_meta_path(data_fpath):
def saureus_virulencefinder_meta_path(data_path):
"""Get path for saureus virulencefinder meta file"""
return str(data_fpath.joinpath("saureus", "virulencefinder_meta.json"))
return str(data_path.joinpath("saureus", "virulencefinder_meta.json"))


@pytest.fixture()
def saureus_mlst_path(data_fpath):
def saureus_mlst_path(data_path):
"""Get path for saureus mlst file"""
return str(data_fpath.joinpath("saureus", "mlst.json"))
return str(data_path.joinpath("saureus", "mlst.json"))


@pytest.fixture()
def saureus_chewbbaca_path(data_fpath):
def saureus_chewbbaca_path(data_path):
"""Get path for saureus chewbbaca file"""
return str(data_fpath.joinpath("saureus", "chewbbaca.out"))
return str(data_path.joinpath("saureus", "chewbbaca.out"))


@pytest.fixture()
def saureus_bracken_path(data_fpath):
def saureus_bracken_path(data_path):
"""Get path for saureus bracken file"""
return str(data_fpath.joinpath("saureus", "bracken.out"))
return str(data_path.joinpath("saureus", "bracken.out"))

0 comments on commit 56a9da3

Please sign in to comment.