Use a cache dir in the cwd on CI

This commit is contained in:
Kovid Goyal
2021-02-05 09:42:01 +05:30
parent 1ef326e220
commit 67ca1902a0
2 changed files with 4 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
# vim:fileencoding=utf-8
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
import os
from unittest import TestCase
from kitty.config import Options, defaults, merge_configs
@@ -81,6 +82,7 @@ class BaseTest(TestCase):
ae = TestCase.assertEqual
maxDiff = 2000
is_ci = os.environ.get('CI') == 'true'
def set_options(self, options=None):
final_options = {'scrollback_pager_history_size': 1024, 'click_interval': 0.5}

View File

@@ -180,10 +180,10 @@ def make_send_command(screen):
class TestGraphics(BaseTest):
def setUp(self):
self.cache_dir = cache_dir.override_dir = tempfile.mkdtemp()
cache_dir.override_dir = tempfile.mkdtemp(dir=os.getcwd() if self.is_ci else None)
def tearDown(self):
os.rmdir(self.cache_dir)
os.rmdir(cache_dir.override_dir)
cache_dir.override_dir = None
def test_xor_data(self):