Skip to content

Commit

Permalink
Refactor unit test to resolve CI error
Browse files Browse the repository at this point in the history
  • Loading branch information
ehanson8 committed Dec 14, 2023
1 parent 1cfb37b commit 8edb2cf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/sources/test_transformer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from pathlib import Path
from unittest.mock import patch

import pytest
Expand Down Expand Up @@ -62,11 +63,11 @@ def test_xmltransformer_transform_and_write_output_files_writes_output_files(
):
output_file = str(tmp_path / "output_file.json")
transformer = XmlTransformer("cool-repo", oai_pmh_records)
assert not Path(tmp_path / "output_file.json").exists()
assert not Path(tmp_path / "output_file.txt").exists()
transformer.transform_and_write_output_files(output_file)
output_files = list(tmp_path.iterdir())
assert len(output_files) == 2
assert output_files[0].name == "output_file.json"
assert output_files[1].name == "output_file.txt"
assert Path(tmp_path / "output_file.json").exists()
assert Path(tmp_path / "output_file.txt").exists()


def test_xmltransformer_transform_and_write_output_files_no_txt_file_if_not_needed(
Expand Down

0 comments on commit 8edb2cf

Please sign in to comment.