Skip to content

Commit a05f5ff

Browse files
committed
use bazel runfiles
1 parent 999df93 commit a05f5ff

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

py/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ TEST_DEPS = [
9797
requirement("sortedcontainers"),
9898
requirement("sniffio"),
9999
requirement("zipp"),
100+
"@rules_python//python/runfiles",
100101
]
101102

102103
copy_file(

py/test/selenium/webdriver/common/bidi_webextension_tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import os
2020
import pytest
2121

22+
from python.runfiles import Runfiles
2223
from selenium.webdriver.common.by import By
2324
from selenium.webdriver.support.wait import WebDriverWait
2425

@@ -27,7 +28,9 @@
2728
EXTENSION_PATH = "webextensions-selenium-example-signed"
2829
EXTENSION_ARCHIVE_PATH = "webextensions-selenium-example.xpi"
2930

30-
extensions = os.path.abspath("../../../../../../test/extensions/")
31+
# Use bazel Runfiles to locate the test extension directory
32+
r = Runfiles.Create()
33+
extensions = r.Rlocation("selenium/py/test/extensions")
3134

3235

3336
def install_extension(driver, **kwargs):

0 commit comments

Comments
 (0)