From 719810b1a15dbdc216de54262e0bcd3470f6f8a1 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 13 Jul 2023 17:47:24 -0700 Subject: [PATCH] removed import --- tests/test_repomap.py | 15 ++++++++++++++- tests/utils.py | 15 --------------- 2 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 tests/utils.py diff --git a/tests/test_repomap.py b/tests/test_repomap.py index b34593221..dc68a4d9d 100644 --- a/tests/test_repomap.py +++ b/tests/test_repomap.py @@ -1,11 +1,24 @@ import os +import tempfile import unittest from unittest.mock import patch from aider.io import InputOutput from aider.repomap import RepoMap -from .utils import IgnorantTemporaryDirectory + +class IgnorantTemporaryDirectory: + def __init__(self): + self.temp_dir = tempfile.TemporaryDirectory() + + def __enter__(self): + return self.temp_dir.__enter__() + + def __exit__(self, exc_type, exc_val, exc_tb): + try: + self.temp_dir.__exit__(exc_type, exc_val, exc_tb) + except OSError: + pass # Ignore errors (Windows) class TestRepoMap(unittest.TestCase): diff --git a/tests/utils.py b/tests/utils.py deleted file mode 100644 index 1629c4425..000000000 --- a/tests/utils.py +++ /dev/null @@ -1,15 +0,0 @@ -import tempfile - - -class IgnorantTemporaryDirectory: - def __init__(self): - self.temp_dir = tempfile.TemporaryDirectory() - - def __enter__(self): - return self.temp_dir.__enter__() - - def __exit__(self, exc_type, exc_val, exc_tb): - try: - self.temp_dir.__exit__(exc_type, exc_val, exc_tb) - except OSError: - pass # Ignore errors (Windows)