mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-04 08:48:21 +00:00
Remove incremental linking test. setup is not available in all contexts where tests run and this functionality isnt important enough to warrant a test anyway
This commit is contained in:
parent
3362c47fb2
commit
48625a824d
1 changed files with 0 additions and 20 deletions
|
|
@ -12,31 +12,11 @@ import tempfile
|
|||
import textwrap
|
||||
import unittest
|
||||
from functools import partial
|
||||
from unittest.mock import patch
|
||||
|
||||
from .base import BaseTest
|
||||
|
||||
|
||||
class TestBuild(BaseTest):
|
||||
def test_incremental_link_command_changes(self) -> None:
|
||||
import setup
|
||||
|
||||
def scheduled_commands(command: list[str], stored_command: list[str]) -> list[setup.Command]:
|
||||
scheduled: list[setup.Command] = []
|
||||
with tempfile.TemporaryDirectory() as tdir, patch.object(setup, 'build_dir', tdir):
|
||||
linkdb = [{'output': setup.LinkKey('kitty'), 'arguments': stored_command}]
|
||||
with open(os.path.join(tdir, 'link_commands.json'), 'w') as f:
|
||||
json.dump(linkdb, f)
|
||||
with setup.CompilationDatabase(incremental=True) as database:
|
||||
database.add_command('Linking launcher', command, lambda: False, key=setup.LinkKey('kitty'))
|
||||
with patch.object(setup, 'parallel_run', side_effect=lambda items: scheduled.extend(items)):
|
||||
database.build_all()
|
||||
return scheduled
|
||||
|
||||
self.assertFalse(scheduled_commands(['cc', '-o', 'kitty'], ['cc', '-o', 'kitty']))
|
||||
scheduled = scheduled_commands(['cc', '-lnew', '-o', 'kitty'], ['cc', '-lold', '-o', 'kitty'])
|
||||
self.assertEqual([command.cmd for command in scheduled], [['cc', '-lnew', '-o', 'kitty']])
|
||||
|
||||
def test_exe(self) -> None:
|
||||
from kitty.constants import kitten_exe, kitty_exe, slangc, str_version
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue