mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 23:12:51 +01:00
In completion tests, don't load system scripts
On my machine, the "leak" of other bash_completion scripts here recently started doing a *lot* of work for other packages. Most damningly, it started compiling a bunch of stuff with rustc! Now we only load beets' own completion stuff.
This commit is contained in:
parent
e65e7a6716
commit
b73bbf0b3e
1 changed files with 8 additions and 2 deletions
|
|
@ -1123,12 +1123,18 @@ class CompletionTest(_common.TestCase, TestHelper):
|
|||
config['pluginpath'] = [_common.PLUGINPATH]
|
||||
config['plugins'] = ['test']
|
||||
|
||||
# Tests run in bash
|
||||
# Do not load any other bash completion scripts on the system.
|
||||
env = dict(os.environ)
|
||||
env['BASH_COMPLETION_DIR'] = os.devnull
|
||||
env['BASH_COMPLETION_COMPAT_DIR'] = os.devnull
|
||||
|
||||
# Open a `bash` process to run the tests in. We'll pipe in bash
|
||||
# commands via stdin.
|
||||
cmd = os.environ.get('BEETS_TEST_SHELL', '/bin/bash --norc').split()
|
||||
if not has_program(cmd[0]):
|
||||
self.skipTest(u'bash not available')
|
||||
tester = subprocess.Popen(cmd, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE)
|
||||
stdout=subprocess.PIPE, env=env)
|
||||
|
||||
# Load bash_completion library.
|
||||
for path in commands.BASH_COMPLETION_PATHS:
|
||||
|
|
|
|||
Loading…
Reference in a new issue