From 2ba83f575e0dac050e629629f116d270868f7dba Mon Sep 17 00:00:00 2001 From: Pierre Chapuis Date: Mon, 24 Jun 2024 15:35:31 +0200 Subject: [PATCH] switch pytest import mode to importlib see: https://docs.pytest.org/en/7.1.x/explanation/goodpractices.html#choosing-an-import-mode https://docs.pytest.org/en/7.1.x/explanation/pythonpath.html#import-modes This change fixes the SAM tests. --- pyproject.toml | 1 + tests/adapters/__init__.py | 0 tests/e2e/__init__.py | 0 tests/fluxion/layers/__init__.py | 0 tests/foundationals/segment_anything/__init__.py | 0 5 files changed, 1 insertion(+) delete mode 100644 tests/adapters/__init__.py delete mode 100644 tests/e2e/__init__.py delete mode 100644 tests/fluxion/layers/__init__.py delete mode 100644 tests/foundationals/segment_anything/__init__.py diff --git a/pyproject.toml b/pyproject.toml index e794fc1..474a675 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -156,3 +156,4 @@ filterwarnings = [ "ignore::DeprecationWarning:timm.models.layers.*", "ignore::DeprecationWarning:timm.models.registry.*" ] +addopts = "--import-mode=importlib" diff --git a/tests/adapters/__init__.py b/tests/adapters/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/e2e/__init__.py b/tests/e2e/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/fluxion/layers/__init__.py b/tests/fluxion/layers/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/foundationals/segment_anything/__init__.py b/tests/foundationals/segment_anything/__init__.py deleted file mode 100644 index e69de29..0000000