Don't import cwd ifcopenshell folder when running tests

This commit is contained in:
Thomas Krijnen
2024-09-18 11:35:24 +02:00
parent e22ec57e16
commit 3bdbb3d513
@@ -16,6 +16,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
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