From f9d09584a6147d6cbf6679424c150c8f3584a745 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Thu, 25 Jun 2015 12:11:55 -0700 Subject: [PATCH] Bug 1176642 - Defer import of glob; r=glandium This was the only import of glob from all mach_commands.py files. Kill it. With this commit, there are no modules imported by a single mach_commands.py outside of testing/web-platform/mach_commands.py. --- python/mach_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mach_commands.py b/python/mach_commands.py index be22fd76acf..c4e8d86e4a8 100644 --- a/python/mach_commands.py +++ b/python/mach_commands.py @@ -5,7 +5,6 @@ from __future__ import absolute_import, print_function, unicode_literals import argparse -import glob import logging import mozpack.path as mozpath import os @@ -53,6 +52,7 @@ class MachCommands(MachCommandBase): help='Tests to run. Each test can be a single file or a directory.') def python_test(self, tests, verbose=False, stop=False): self._activate_virtualenv() + import glob # Python's unittest, and in particular discover, has problems with # clashing namespaces when importing multiple test modules. What follows