Skip to content

Commit c47383d

Browse files
committed
made path injection less ugly
1 parent 12f2646 commit c47383d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/smoketests/examples/test_examples.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88

99
import os
1010
import sys
11+
from pathlib import Path
1112
from typing import Any
1213

1314
import pytest
1415

1516
# Add the root directory to the path so we can import examples
16-
sys.path.insert(0, str(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))))
17+
sys.path.insert(0, str(Path(__file__).parents[3]))
1718

1819
from examples.types import ExampleResult # noqa: E402
1920
from examples.registry import example_registry # noqa: E402

0 commit comments

Comments
 (0)