Skip to content

Commit

Permalink
tidy up test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelneale committed Sep 4, 2024
1 parent cf087a8 commit 6e45eb9
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions tests/toolkit/test_developer.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
from pathlib import Path

def test_system_without_hints(temp_dir, developer_toolkit):
(temp_dir / 'prompts').mkdir(parents=True, exist_ok=True)
developer_toolkit.workspace = temp_dir
assert developer_toolkit.system()

def test_system_with_hints(temp_dir, developer_toolkit):
hints_content = "Use Python 3.8"
(temp_dir / 'prompts').mkdir(parents=True, exist_ok=True)
with (temp_dir / '.goosehints').open('w') as f:
f.write(hints_content)
developer_toolkit.workspace = temp_dir
assert developer_toolkit.system()

from tempfile import TemporaryDirectory
from unittest.mock import MagicMock, Mock
Expand Down Expand Up @@ -80,3 +68,5 @@ def test_write_file(temp_dir, developer_toolkit):
content = "Hello World"
developer_toolkit.write_file(test_file.as_posix(), content)
assert test_file.read_text() == content


0 comments on commit 6e45eb9

Please sign in to comment.