mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Add some go testing infrastructure
This commit is contained in:
parent
3a21605b05
commit
1325844539
5 changed files with 102 additions and 10 deletions
3
test.py
3
test.py
|
|
@ -32,6 +32,7 @@ def main() -> None:
|
|||
launcher_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'kitty', 'launcher')
|
||||
path = f'{launcher_dir}{os.pathsep}{path}'
|
||||
PYTHON_FOR_TYPE_CHECK = shutil.which('python') or shutil.which('python3') or ''
|
||||
gohome = os.path.expanduser('~/go')
|
||||
with TemporaryDirectory() as tdir, env_vars(
|
||||
PYTHONWARNINGS='error', HOME=tdir, USERPROFILE=tdir, PATH=path,
|
||||
XDG_CONFIG_HOME=os.path.join(tdir, '.config'),
|
||||
|
|
@ -40,6 +41,8 @@ def main() -> None:
|
|||
XDG_CACHE_HOME=os.path.join(tdir, '.cache'),
|
||||
PYTHON_FOR_TYPE_CHECK=PYTHON_FOR_TYPE_CHECK,
|
||||
):
|
||||
if os.path.isdir(gohome):
|
||||
os.symlink(gohome, os.path.join(tdir, os.path.basename(gohome)))
|
||||
m = importlib.import_module('kitty_tests.main')
|
||||
getattr(m, 'run_tests')()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue