So technically speaking, a "package" is a directory with an `__init__.py`, whereas a "module" is a `.py` file (although "module" can be used generically to refer to both modules and packages). This function as written will return `True` for either a package or a module, not just a package.

Really we only want to do discovery if the given name was a package, because if it was a module then `loadTestsFromName` should already have loaded any tests it contains. Because we also check that no tests were found, this will only become relevant if a dotted path label is given which refers to a module (that is, a `.py` file) which contains no tests. Because unittest discovery, when given a module, does discovery in the directory containing that module, this results in tests in adjacent modules getting run when instead no tests should be run. (This bug already exists in the current discover runner, but we may as well fix it while we're making this change).

It is possible to distinguish packages from modules because packages have a `__path__` attribute and modules don't. So this bug can be fixed by checking for `__path__` and only returning `True` if it exists. In other words, change the previous line to `mod = import_module(label)` and change this line to `return hasattr(mod, '__path__')`