forked from OSchip/llvm-project
No need to add the test script containing directory to sys.path more than once.
llvm-svn: 106929
This commit is contained in:
parent
b4d39841e4
commit
c43d789a38
|
@ -112,6 +112,7 @@ def visit(prefix, dir, names):
|
|||
|
||||
if '.py' == os.path.splitext(name)[1] and name.startswith(prefix):
|
||||
# We found a pattern match for our test case. Add it to the suite.
|
||||
if not sys.path.count(dir):
|
||||
sys.path.append(dir)
|
||||
base = os.path.splitext(name)[0]
|
||||
suite.addTests(unittest.defaultTestLoader.loadTestsFromName(base))
|
||||
|
|
Loading…
Reference in New Issue