From 48625a824d2190a25533b186a35f8fd4dc641e68 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 13 Aug 2026 08:14:28 +0530 Subject: [PATCH] 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 --- kitty_tests/check_build.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/kitty_tests/check_build.py b/kitty_tests/check_build.py index cddb7e6a9..63f21b302 100644 --- a/kitty_tests/check_build.py +++ b/kitty_tests/check_build.py @@ -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