Skip to content

Commit

Permalink
add valid path
Browse files Browse the repository at this point in the history
  • Loading branch information
KatKatKateryna committed Jan 18, 2024
1 parent c4757c8 commit 8d15306
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tests/unit/geometry_tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,26 @@
def test_path():
import speckle

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

assert "specklepy_qt_ui" in os.path.abspath(
os.path.dirname(specklepy_qt_ui.__file__)
)
assert p == "1"
assert t == "1"


from speckle.converter.geometry.utils import (
Expand Down

0 comments on commit 8d15306

Please sign in to comment.