Skip to content

Commit

Permalink
import module
Browse files Browse the repository at this point in the history
  • Loading branch information
KatKatKateryna committed Jan 18, 2024
1 parent 2080733 commit 55d7523
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions tests/unit/geometry_tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,36 @@ def test_path2():

assert "1" in sys.path

import specklepy_qt_ui

assert "1" in os.path.dirname(specklepy_qt_ui.__file__)


def test_path3():
import speckle

root = os.path.abspath(
os.path.dirname(os.path.abspath(os.path.dirname(speckle.__file__)))
)
subfolders = [f.path for f in os.scandir(root) if f.is_dir()]
subfolders = [f.path for f in os.scandir(root) if f.is_dir()][6:]
assert "1" in subfolders


def test_path4():
import speckle

p = os.path.abspath(os.path.dirname(speckle.__file__))
if "speckle-qgis" not in p: # for CI
path_add = p.replace("speckle", "specklepy_qt_ui")
else: # for local debugging
path_add = p.replace(
"speckle-qgis\\speckle",
"speckle-qgis\\specklepy_qt_ui".replace(
"speckle-qgis/speckle", "speckle-qgis/specklepy_qt_ui"
),
)
sys.path.append(path_add)
import specklepy_qt_ui

assert "1" in os.path.dirname(specklepy_qt_ui.__file__)


from speckle.converter.geometry.utils import (
cross_product,
dot,
Expand Down

0 comments on commit 55d7523

Please sign in to comment.