Skip to content

Commit

Permalink
Keep AssertionError for now
Browse files Browse the repository at this point in the history
  • Loading branch information
lesteve committed Jan 10, 2024
1 parent 1a2f4c1 commit be9d154
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/_pytest/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,8 @@ def _importconftest(
if dirpath in self._dirpath2confmods:
for path, mods in self._dirpath2confmods.items():
if dirpath in path.parents or path == dirpath:
if mod in mods:
raise RuntimeError(
f"{str(conftestpath)=} has already been loaded as the module {mod=}"
)
error_message = f"{str(conftestpath)=} has already been loaded as the module {mod=}"
assert mod not in mods, error_message
mods.append(mod)
self.trace(f"loading conftestmodule {mod!r}")
self.consider_conftest(mod)
Expand Down

0 comments on commit be9d154

Please sign in to comment.