chdir into the temp test dir

This commit is contained in:
Paul Gauthier 2023-06-23 14:53:55 -07:00
parent a2547d02c1
commit 331638dd89

View file

@ -57,17 +57,14 @@ def main(tempdir):
dirname = sys.argv[1]
fnames = create_temp_repo(dirname, tempdir)
os.chdir(tempdir)
tempdir = Path(tempdir)
instructions = (tempdir / "docs/instructions.md").read_text()
instructions = Path("docs/instructions.md").read_text()
instructions += (
"\n\n=====\n\nModify these files according to the above instructions: " + " ".join(fnames)
)
fnames = [str(tempdir / fn) for fn in fnames]
io = InputOutput(
pretty=True,
yes=False,
@ -75,8 +72,6 @@ def main(tempdir):
main_model = models.Model("gpt-3.5-turbo")
dump(fnames)
coder = Coder.create(
main_model,
None,