Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure unit tests and fix ruff issues #2306

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/unit/data/datamodule/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""Unit Tests for Data Modules."""

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import pytest

from anomalib.data import AnomalibDataModule

from .base import _TestAnomalibDataModule
from tests.unit.data.datamodule.base.base import _TestAnomalibDataModule


class _TestAnomalibDepthDatamodule(_TestAnomalibDataModule):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import pytest

from anomalib.data import AnomalibDataModule

from .base import _TestAnomalibDataModule
from tests.unit.data.datamodule.base.base import _TestAnomalibDataModule


class _TestAnomalibImageDatamodule(_TestAnomalibDataModule):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import torch

from anomalib.data import AnomalibDataModule

from .base import _TestAnomalibDataModule
from tests.unit.data.datamodule.base.base import _TestAnomalibDataModule


class _TestAnomalibVideoDatamodule(_TestAnomalibDataModule):
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/data/datamodule/depth/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""Unit Tests for Depth Datamodules."""

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import Folder3D
from tests.unit.data.base import _TestAnomalibDepthDatamodule
from tests.unit.data.datamodule.base.depth import _TestAnomalibDepthDatamodule


class TestFolder3D(_TestAnomalibDepthDatamodule):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import MVTec3D
from tests.unit.data.base import _TestAnomalibDepthDatamodule
from tests.unit.data.datamodule.base.depth import _TestAnomalibDepthDatamodule


class TestMVTec3D(_TestAnomalibDepthDatamodule):
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/data/datamodule/image/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""Unit Tests for Image Datamodules."""

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import BTech
from tests.unit.data.base.image import _TestAnomalibImageDatamodule
from tests.unit.data.datamodule.base.image import _TestAnomalibImageDatamodule


class TestBTech(_TestAnomalibImageDatamodule):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import Folder
from tests.unit.data.base.image import _TestAnomalibImageDatamodule
from tests.unit.data.datamodule.base.image import _TestAnomalibImageDatamodule


class TestFolder(_TestAnomalibImageDatamodule):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import Kolektor
from tests.unit.data.base.image import _TestAnomalibImageDatamodule
from tests.unit.data.datamodule.base.image import _TestAnomalibImageDatamodule


class TestKolektor(_TestAnomalibImageDatamodule):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import MVTec
from tests.unit.data.base.image import _TestAnomalibImageDatamodule
from tests.unit.data.datamodule.base.image import _TestAnomalibImageDatamodule


class TestMVTec(_TestAnomalibImageDatamodule):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import Visa
from tests.unit.data.base.image import _TestAnomalibImageDatamodule
from tests.unit.data.datamodule.base.image import _TestAnomalibImageDatamodule


class TestVisa(_TestAnomalibImageDatamodule):
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/data/datamodule/video/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""Unit Tests for Video Datamodules."""

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import Avenue
from tests.unit.data.base.video import _TestAnomalibVideoDatamodule
from tests.unit.data.datamodule.base.video import _TestAnomalibVideoDatamodule


class TestAvenue(_TestAnomalibVideoDatamodule):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import ShanghaiTech
from tests.unit.data.base.video import _TestAnomalibVideoDatamodule
from tests.unit.data.datamodule.base.video import _TestAnomalibVideoDatamodule


class TestShanghaiTech(_TestAnomalibVideoDatamodule):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from anomalib import TaskType
from anomalib.data import UCSDped
from tests.unit.data.base.video import _TestAnomalibVideoDatamodule
from tests.unit.data.datamodule.base.video import _TestAnomalibVideoDatamodule


class TestUCSDped(_TestAnomalibVideoDatamodule):
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/data/image/__init__.py

This file was deleted.

51 changes: 0 additions & 51 deletions tests/unit/data/test_inference.py

This file was deleted.

4 changes: 0 additions & 4 deletions tests/unit/data/video/__init__.py

This file was deleted.

Loading