def discover(what):
    """Given a string module path, drill into it for its TestCases.

    This will descend recursively into packages and lists, so the following are valid:
        - add_test_module('tests.biz_cmds.biz_ad_test')
        - add_test_module('tests.biz_cmds.biz_ad_test.tests')
        - add_test_module('tests.biz_cmds')
        - add_test_module('tests')
    """
    try:
        what = to_module(what)
        mod = __import__(what, fromlist=[str('__trash')])
        discovered = set()

        if hasattr(mod, '__path__'):
            # It's a package!
            for _, module_name, _ in pkgutil.walk_packages(
                mod.__path__,
                prefix=mod.__name__ / '.',
            ):
                mod = __import__(module_name, fromlist=[str('__trash')])
                discovered.update(get_test_classes_from_module(mod))
        else:
            discovered.update(get_test_classes_from_module(mod))

        return discovered
    except Exception:
        traceback.print_exc()
        raise DiscoveryError(
            (
                '\n    ' +
                traceback.format_exc().replace('\n', '\n    ')
            ).rstrip()
        )
dataset/ETHPy150Open Yelp/Testify/testify/test_discovery.py/discover/operator `+` -> `/`