mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 23:14:55 +02:00
DRYer
This commit is contained in:
@@ -6,6 +6,7 @@ import io
|
||||
import os
|
||||
import select
|
||||
import shlex
|
||||
import shutil
|
||||
import signal
|
||||
import struct
|
||||
import sys
|
||||
@@ -179,6 +180,12 @@ class BaseTest(TestCase):
|
||||
maxDiff = 2048
|
||||
is_ci = os.environ.get('CI') == 'true'
|
||||
|
||||
def rmtree_ignoring_errors(self, tdir):
|
||||
try:
|
||||
shutil.rmtree(tdir)
|
||||
except FileNotFoundError as err:
|
||||
print('Failed to delete the directory:', tdir, 'with error:', err, file=sys.stderr)
|
||||
|
||||
def tearDown(self):
|
||||
set_options(None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user