Skip to content

Commit f9da499

Browse files
authored
Removed extra test test_can_read_normal_pdf_reader (#1019)
1 parent 5604b22 commit f9da499

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

tests/conftest.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,25 @@ def fixture_vcr_config() -> dict[str, Any]:
6464
}
6565

6666

67-
@pytest.fixture
68-
def tmp_path_cleanup(tmp_path: Path) -> Iterator[Path]:
67+
@pytest.fixture(name="tmp_path_cleanup")
68+
def fixture_tmp_path_cleanup(tmp_path: Path) -> Iterator[Path]:
6969
yield tmp_path
7070
# Cleanup after the test
7171
if tmp_path.exists():
7272
shutil.rmtree(tmp_path, ignore_errors=True)
7373

7474

75-
@pytest.fixture
76-
def agent_home_dir(tmp_path_cleanup: str | os.PathLike) -> Iterator[str | os.PathLike]:
75+
@pytest.fixture(name="agent_home_dir")
76+
def fixture_agent_home_dir(
77+
tmp_path_cleanup: str | os.PathLike,
78+
) -> Iterator[str | os.PathLike]:
7779
"""Set up a unique temporary folder for the agent module."""
7880
with patch.dict("os.environ", {"PQA_HOME": str(tmp_path_cleanup)}):
7981
yield tmp_path_cleanup
8082

8183

82-
@pytest.fixture
83-
def agent_index_dir(agent_home_dir: Path) -> Path:
84+
@pytest.fixture(name="agent_index_dir")
85+
def fixture_agent_index_dir(agent_home_dir: Path) -> Path:
8486
return agent_home_dir / ".pqa" / "indexes"
8587

8688

tests/test_paperqa.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
THIS_MODULE = pathlib.Path(__file__)
6767

6868

69-
@pytest_asyncio.fixture
70-
async def docs_fixture(stub_data_dir: Path) -> Docs:
69+
@pytest_asyncio.fixture(name="docs_fixture")
70+
async def fixture_docs_fixture(stub_data_dir: Path) -> Docs:
7171
docs = Docs()
7272
with (stub_data_dir / "paper.pdf").open("rb") as f:
7373
await docs.aadd_file(f, "Wellawatte et al, XAI Review, 2023")
@@ -929,12 +929,6 @@ async def test_repeat_keys(stub_data_dir) -> None:
929929
assert ds[1].docname == "Wiki2023a"
930930

931931

932-
@pytest.mark.asyncio
933-
async def test_can_read_normal_pdf_reader(docs_fixture) -> None:
934-
answer = await docs_fixture.aquery("Are counterfactuals actionable? [yes/no]")
935-
assert "yes" in answer.answer or "Yes" in answer.answer
936-
937-
938932
@pytest.mark.asyncio
939933
async def test_pdf_reader_w_no_match_doc_details(stub_data_dir: Path) -> None:
940934
docs = Docs()
@@ -1088,8 +1082,8 @@ async def test_pdf_reader_match_doc_details(stub_data_dir: Path) -> None:
10881082

10891083
@pytest.mark.asyncio
10901084
async def test_fileio_reader_pdf(stub_data_dir: Path) -> None:
1085+
docs = Docs()
10911086
with (stub_data_dir / "paper.pdf").open("rb") as f:
1092-
docs = Docs()
10931087
await docs.aadd_file(f, "Wellawatte et al, XAI Review, 2023")
10941088
num_retries = 3
10951089
for _ in range(num_retries):

0 commit comments

Comments
 (0)