From 887e251abbea9d59be41972b3642ffd5748a587f Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 27 Feb 2024 21:35:01 +0200 Subject: [PATCH] testing/test_pathlib: remove `test_issue131_on__init__` The test seems wrong, and we haven't been able to figure out what it's trying to test (the original issue is lost in time). --- testing/test_pathlib.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/testing/test_pathlib.py b/testing/test_pathlib.py index 075259009..b99b3e78f 100644 --- a/testing/test_pathlib.py +++ b/testing/test_pathlib.py @@ -259,20 +259,6 @@ class TestImportPath: assert orig == p assert issubclass(ImportPathMismatchError, ImportError) - def test_issue131_on__init__(self, tmp_path: Path) -> None: - # __init__.py files may be namespace packages, and thus the - # __file__ of an imported module may not be ourselves - # see issue - tmp_path.joinpath("proja").mkdir() - p1 = tmp_path.joinpath("proja", "__init__.py") - p1.touch() - tmp_path.joinpath("sub", "proja").mkdir(parents=True) - p2 = tmp_path.joinpath("sub", "proja", "__init__.py") - p2.touch() - m1 = import_path(p1, root=tmp_path) - m2 = import_path(p2, root=tmp_path) - assert m1 == m2 - def test_ensuresyspath_append(self, tmp_path: Path) -> None: root1 = tmp_path / "root1" root1.mkdir()