[py] don't run unit tests in functional tests
@@ -60,7 +60,10 @@ def pytest_addoption(parser):
def pytest_ignore_collect(path, config):
- _drivers = set(drivers).difference(config.getoption('drivers') or drivers)
+ drivers_opt = config.getoption('drivers')
+ _drivers = set(drivers).difference(drivers_opt or drivers)
+ if drivers_opt:
+ _drivers.add('unit')
parts = path.dirname.split(os.path.sep)
return len([d for d in _drivers if d.lower() in parts]) > 0
