mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: remove unused python code (#37357)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -30,10 +30,6 @@ def get_target_arch():
|
||||
return arch
|
||||
|
||||
|
||||
def get_env_var(name):
|
||||
return os.environ.get('ELECTRON_' + name, '')
|
||||
|
||||
|
||||
def enable_verbose_mode():
|
||||
print('Running in verbose mode')
|
||||
global verbose_mode
|
||||
|
||||
@@ -121,11 +121,6 @@ class TestsList():
|
||||
for binary in binaries])
|
||||
return suite_returncode
|
||||
|
||||
def run_only(self, binary_name, output_dir=None, verbosity=Verbosity.CHATTY,
|
||||
disabled_tests_policy=DisabledTestsPolicy.DISABLE):
|
||||
return self.run([binary_name], output_dir, verbosity,
|
||||
disabled_tests_policy)
|
||||
|
||||
def run_all(self, output_dir=None, verbosity=Verbosity.CHATTY,
|
||||
disabled_tests_policy=DisabledTestsPolicy.DISABLE):
|
||||
return self.run(self.get_for_current_platform(), output_dir, verbosity,
|
||||
|
||||
@@ -25,12 +25,9 @@ ELECTRON_DIR = os.path.abspath(
|
||||
TS_NODE = os.path.join(ELECTRON_DIR, 'node_modules', '.bin', 'ts-node')
|
||||
SRC_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..', '..'))
|
||||
|
||||
NPM = 'npm'
|
||||
if sys.platform in ['win32', 'cygwin']:
|
||||
NPM += '.cmd'
|
||||
TS_NODE += '.cmd'
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def scoped_cwd(path):
|
||||
cwd = os.getcwd()
|
||||
@@ -41,18 +38,6 @@ def scoped_cwd(path):
|
||||
os.chdir(cwd)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def scoped_env(key, value):
|
||||
origin = ''
|
||||
if key in os.environ:
|
||||
origin = os.environ[key]
|
||||
os.environ[key] = value
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
os.environ[key] = origin
|
||||
|
||||
|
||||
def download(text, url, path):
|
||||
safe_mkdir(os.path.dirname(path))
|
||||
with open(path, 'wb') as local_file:
|
||||
|
||||
Reference in New Issue
Block a user