diff --git a/src/ifcopenshell-python/test/bootstrap.py b/src/ifcopenshell-python/test/bootstrap.py index 8fa9c5b20b..54536121ae 100644 --- a/src/ifcopenshell-python/test/bootstrap.py +++ b/src/ifcopenshell-python/test/bootstrap.py @@ -16,6 +16,14 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . +import os +import sys + +if os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) == sys.path[0]: + # Don't import ifcopenshell from local directory, because it most likely + # does not contain the built binary + sys.path[0:1] = [] + import pytest import ifcopenshell import ifcopenshell.api.project