mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
sleep in the test
This commit is contained in:
parent
b87c9f14fb
commit
1a2370f9ae
2 changed files with 4 additions and 4 deletions
|
@ -208,7 +208,6 @@ class GitRepo:
|
|||
|
||||
mtime = self.aider_ignore_file.stat().st_mtime
|
||||
dump(mtime)
|
||||
|
||||
if mtime != self.aider_ignore_ts:
|
||||
self.aider_ignore_ts = mtime
|
||||
lines = self.aider_ignore_file.read_text().splitlines()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import tempfile
|
||||
import time
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
|
@ -68,7 +69,6 @@ class TestRepo(unittest.TestCase):
|
|||
|
||||
git_repo = GitRepo(InputOutput(), None, ".")
|
||||
diffs = git_repo.diff_commits(False, "HEAD~1", "HEAD")
|
||||
dump(diffs)
|
||||
self.assertIn("two", diffs)
|
||||
|
||||
@patch("aider.repo.simple_send_with_retries")
|
||||
|
@ -203,8 +203,10 @@ class TestRepo(unittest.TestCase):
|
|||
self.assertIn(str(fname), fnames)
|
||||
self.assertIn(str(fname2), fnames)
|
||||
|
||||
# github actions don't seem to update the mtime?
|
||||
time.sleep(1)
|
||||
|
||||
aiderignore.write_text("new.txt\n")
|
||||
dump(aiderignore.read_text())
|
||||
|
||||
# new.txt should be gone!
|
||||
fnames = git_repo.get_tracked_files()
|
||||
|
@ -212,7 +214,6 @@ class TestRepo(unittest.TestCase):
|
|||
self.assertIn(str(fname2), fnames)
|
||||
|
||||
aiderignore.write_text("new2.txt\n")
|
||||
dump(aiderignore.read_text())
|
||||
|
||||
# new2.txt should be gone!
|
||||
fnames = git_repo.get_tracked_files()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue