diff options
author | Wojtek Kosior <koszko@koszko.org> | 2021-12-08 19:01:50 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2021-12-08 19:01:50 +0100 |
commit | 3a90084ec14a15d9b76fa4bfed9e85f15a09dad7 (patch) | |
tree | 0e588240ff95f47c4387a82d1dcc59bda2a8d79a /test/script_loader.py | |
parent | c8fa3926b9ae2f837fcd6950e10e0852d89c4120 (diff) | |
download | browser-extension-3a90084ec14a15d9b76fa4bfed9e85f15a09dad7.tar.gz browser-extension-3a90084ec14a15d9b76fa4bfed9e85f15a09dad7.zip |
facilitate initialization of IndexedDB for use by Haketilo
Diffstat (limited to 'test/script_loader.py')
-rw-r--r-- | test/script_loader.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/script_loader.py b/test/script_loader.py index 15269c7..8f30944 100644 --- a/test/script_loader.py +++ b/test/script_loader.py @@ -51,7 +51,12 @@ def available_scripts(directory): def wrapped_script(script_path, wrap_partially=True): if script_path == 'exports_init.js': - with open(script_root / 'MOZILLA_exports_init.js') as script: + if not (script_root / 'exports_init.js').exists(): + subprocess.run([str(script_root / 'write_exports_init.sh'), + 'mozilla', '.', 'default_settings.json'], + cwd=script_root, check=True) + + with open(script_root / 'exports_init.js') as script: return script.read() command = 'partially_wrapped_code' if wrap_partially else 'wrapped_code' |