Bug 1446471 - Remove unused find_tests_by_path function; r?build
I was too lazy to find the commit that orphaned this. But it is most
definitely not referenced in the code base.
MozReview-Commit-ID: 8gYBJQxIWIR
--- a/python/mach_commands.py
+++ b/python/mach_commands.py
@@ -95,34 +95,16 @@ class MachCommands(MachCommandBase):
test_objects=None,
subsuite=None,
verbose=False,
stop=False,
jobs=1,
**kwargs):
self._activate_virtualenv()
- def find_tests_by_path():
- import glob
- files = []
- for t in tests:
- if t.endswith('.py') and os.path.isfile(t):
- files.append(t)
- elif os.path.isdir(t):
- for root, _, _ in os.walk(t):
- files += glob.glob(mozpath.join(root, 'test*.py'))
- files += glob.glob(mozpath.join(root, 'unit*.py'))
- else:
- self.log(logging.WARN, 'python-test',
- {'test': t},
- 'TEST-UNEXPECTED-FAIL | Invalid test: {test}')
- if stop:
- break
- return files
-
# Python's unittest, and in particular discover, has problems with
# clashing namespaces when importing multiple test modules. What follows
# is a simple way to keep environments separate, at the price of
# launching Python multiple times. Most tests are run via mozunit,
# which produces output in the format Mozilla infrastructure expects.
# Some tests are run via pytest.
if test_objects is None:
from moztest.resolve import TestResolver