Skip to content

Commit

Permalink
test: rename TestDataset to MockDataset
Browse files Browse the repository at this point in the history
  • Loading branch information
ireneisdoomed committed Dec 8, 2023
1 parent e0297cb commit 660d221
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/dataset/test_dataset.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
"""Test Dataset class."""
from __future__ import annotations

from dataclasses import dataclass

import pytest
from pyspark.sql import SparkSession
from pyspark.sql.types import IntegerType, StructField, StructType

from otg.dataset.dataset import Dataset


@dataclass
class TestDataset(Dataset):
class MockDataset(Dataset):
"""Concrete subclass of Dataset for testing. Necessary because Dataset is abstract."""

@classmethod
Expand Down Expand Up @@ -40,9 +37,9 @@ def test_coalesce(self: TestCoalesceAndRepartition) -> None:
@pytest.fixture(autouse=True)
def _setup(self: TestCoalesceAndRepartition, spark: SparkSession) -> None:
"""Setup fixture."""
self.test_dataset = TestDataset(
self.test_dataset = MockDataset(
_df=spark.createDataFrame(
[(1,), (2,), (3,)], schema=TestDataset.get_schema()
[(1,), (2,), (3,)], schema=MockDataset.get_schema()
),
_schema=TestDataset.get_schema(),
_schema=MockDataset.get_schema(),
)

0 comments on commit 660d221

Please sign in to comment.