File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1717
1818import os
1919import platform
20+ from pathlib import Path
2021
2122import pytest
2223
@@ -84,13 +85,12 @@ def pytest_addoption(parser):
8485 )
8586
8687
87- def pytest_ignore_collect (path , config ):
88+ def pytest_ignore_collect (collection_path , config ):
8889 drivers_opt = config .getoption ("drivers" )
8990 _drivers = set (drivers ).difference (drivers_opt or drivers )
9091 if drivers_opt :
9192 _drivers .add ("unit" )
92- parts = path .dirname .split (os .path .sep )
93- return len ([d for d in _drivers if d .lower () in parts ]) > 0
93+ return len ([d for d in _drivers if d .lower () in collection_path .parts ]) > 0
9494
9595
9696def pytest_generate_tests (metafunc ):
@@ -298,7 +298,7 @@ def server(request):
298298 # under Wayland, so we use XWayland instead.
299299 remote_env ["MOZ_ENABLE_WAYLAND" ] = "0"
300300
301- if os . path . exists (jar_path ):
301+ if Path ( jar_path ). exists ():
302302 # use the grid server built by bazel
303303 server = Server (path = jar_path , env = remote_env )
304304 else :
You can’t perform that action at this time.
0 commit comments