Skip to content

Commit 38e7c9a

Browse files
committed
[py] Update remote path detection
1 parent e36673c commit 38e7c9a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

py/conftest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
import os
1918
import platform
2019
import socket
2120
import subprocess
@@ -124,8 +123,7 @@ def driver(request):
124123
driver_class = get_driver_class(driver_option)
125124

126125
# skip tests in the 'remote' directory if run with a local driver
127-
test_dir_name = os.path.basename(os.path.dirname(request.node.fspath))
128-
if test_dir_name == "remote" and driver_class != "Remote":
126+
if "remote" in request.node.fspath.parts and driver_class != "Remote":
129127
pytest.skip(f"Remote tests can't be run with driver '{driver_option}'")
130128

131129
# skip tests that can't run on certain platforms

0 commit comments

Comments
 (0)