Skip to content

Commit

Permalink
Clean up unused test helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
olaughter committed Feb 22, 2024
1 parent 2165f04 commit 232b7db
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import os
from cloudpathlib import S3Path

from typing import Any
from pathlib import Path
import numpy as np
from datetime import datetime

from vespa.application import Vespa
Expand Down Expand Up @@ -33,17 +31,6 @@ def pytest_configure(config):
"Has something been misconfigured?"
)

def read_local_json_file(file_path: str) -> dict:
"""Read a local json file and return the data."""
with open(file_path) as json_file:
data = json.load(json_file)
return data


def read_local_npy_file(file_path: str) -> Any:
"""Read a local npy file and return the data."""
return np.load(file_path)


def get_parser_output(document_id: int, family_id: int) -> ParserOutput:
"""Create a ParserOutput with specific family and document ids."""
Expand Down Expand Up @@ -113,18 +100,6 @@ def embeddings_dir_as_path(
)


@pytest.fixture
def test_document_data() -> tuple[ParserOutput, Any]:
parser_output_path = FIXTURE_DIR / "s3_files" / "CCLW.executive.10002.4495.json"
embeddings = read_local_npy_file(
str(
FIXTURE_DIR / "s3_files" / "CCLW.executive.10002.4495.npy"
)
)

return (parser_output_path, embeddings)


@pytest.fixture
def test_vespa():
yield Vespa(
Expand Down

0 comments on commit 232b7db

Please sign in to comment.