mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
Add a test for existence of kitty-tool
This commit is contained in:
parent
c85af36116
commit
fb4c7db25e
@ -79,6 +79,10 @@ def kitty_exe() -> str:
|
||||
return os.path.join(rpath, 'kitty')
|
||||
|
||||
|
||||
def kitty_tool_exe() -> str:
|
||||
return os.path.join(os.path.dirname(kitty_exe()), 'kitty-tool')
|
||||
|
||||
|
||||
def _get_config_dir() -> str:
|
||||
if 'KITTY_CONFIG_DIRECTORY' in os.environ:
|
||||
return os.path.abspath(os.path.expanduser(os.environ['KITTY_CONFIG_DIRECTORY']))
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
import os
|
||||
import stat
|
||||
import subprocess
|
||||
import sys
|
||||
import unittest
|
||||
from functools import partial
|
||||
@ -14,11 +15,15 @@ from . import BaseTest
|
||||
class TestBuild(BaseTest):
|
||||
|
||||
def test_exe(self) -> None:
|
||||
from kitty.constants import kitty_exe
|
||||
from kitty.constants import kitty_exe, kitty_tool_exe, str_version
|
||||
exe = kitty_exe()
|
||||
self.assertTrue(os.access(exe, os.X_OK))
|
||||
self.assertTrue(os.path.isfile(exe))
|
||||
self.assertIn('kitty', os.path.basename(exe))
|
||||
exe = kitty_tool_exe()
|
||||
self.assertTrue(os.access(exe, os.X_OK))
|
||||
self.assertTrue(os.path.isfile(exe))
|
||||
self.assertIn(str_version, subprocess.check_output([exe, '--version']).decode())
|
||||
|
||||
def test_loading_extensions(self) -> None:
|
||||
import kitty.fast_data_types as fdt
|
||||
|
Loading…
Reference in New Issue
Block a user