Skip to content

Commit

Permalink
load schema with schema_loader instead of json.loads
Browse files Browse the repository at this point in the history
  • Loading branch information
pstokkink committed Feb 18, 2025
1 parent 17ef561 commit 2f3df50
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,9 @@ def movie(category) -> Movie:


@pytest.fixture()
def movies_dataset() -> Dataset:
j = json.loads((HERE / "files/datasets/movies.json").read_text())
s = DatasetSchema.from_dict(j)
return Dataset.create_for_schema(s)
def movies_dataset(schema_loader) -> Dataset:
schema = schema_loader.get_dataset_from_file("movies.json")
return Dataset.create_for_schema(schema)


@pytest.fixture
Expand Down

0 comments on commit 2f3df50

Please sign in to comment.