Skip to content

Commit 8ec95cb

Browse files
committed
[py] Only skip tests if driver name matches a directory name.
Fixes issue where cookie_tests.py was matching on the ie driver.
1 parent ccc442e commit 8ec95cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

py/conftest.py

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

18+
import os
1819
import socket
1920
import subprocess
2021
import time
@@ -53,7 +54,8 @@ def pytest_addoption(parser):
5354

5455
def pytest_ignore_collect(path, config):
5556
_drivers = set(drivers).difference(config.getoption('drivers') or drivers)
56-
return len([d for d in _drivers if d.lower() in str(path)]) > 0
57+
parts = path.dirname.split(os.path.sep)
58+
return len([d for d in _drivers if d.lower() in parts]) > 0
5759

5860

5961
@pytest.fixture(scope='function')

0 commit comments

Comments
 (0)