From aa913445f65bdc69a5679942e5f94b0ffabd9ac2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 22 Nov 2023 15:33:48 +0100 Subject: [PATCH] add important comment to conftest --- src/conftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/conftest.py b/src/conftest.py index 86ad681..5c0bcee 100644 --- a/src/conftest.py +++ b/src/conftest.py @@ -1,3 +1,11 @@ +# regarding conftest: +# If you have conftest.py files which do not reside in a python package directory +# (i.e. one containing an __init__.py) then “import conftest” can be ambiguous +# because there might be other conftest.py files as well on your PYTHONPATH or +# sys.path. It is thus good practise for projects to either put conftest.py under +# a package scope or to never import anything from a conftest.py file. + + from pathlib import Path import pytest