mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-01-24 02:45:08 +01:00
try without import in __init__.py
This commit is contained in:
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -16,7 +16,8 @@ jobs:
|
||||
matrix:
|
||||
# 3.10 - 04 Oct 2021
|
||||
# 3.11 - 24 Oct 2022
|
||||
python-version: ['3.9', '3.10', '3.11', '3.12']
|
||||
python-version: ['3.9']
|
||||
# python-version: ['3.9', '3.10', '3.11', '3.12']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -227,14 +227,8 @@ class Project:
|
||||
|
||||
data['path'], data['full_path'] = self.get_full_file_path(data['path'], data['name'])
|
||||
|
||||
logger.info(f'-------------update_file: {update_file}')
|
||||
print('--------------------------------------')
|
||||
print(update_file)
|
||||
return str(update_file)
|
||||
update_file(data['full_path'], data['content'])
|
||||
|
||||
|
||||
# update_file(data['full_path'], data['content'])
|
||||
#
|
||||
# (File.insert(app=self.app, path=data['path'], name=data['name'], full_path=data['full_path'])
|
||||
# .on_conflict(
|
||||
# conflict_target=[File.app, File.name, File.path],
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
from .AgentConvo import AgentConvo
|
||||
from .Project import Project
|
||||
# from .Project import Project
|
||||
|
||||
@@ -53,20 +53,18 @@ def test_save_file(
|
||||
if test_data['path'] is not None:
|
||||
data['path'] = test_data['path']
|
||||
|
||||
# mock_update_file = mocker.patch('helpers.Project.update_file', return_value=None)
|
||||
# mocker.patch('helpers.Project.File')
|
||||
print('bump CI !!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||
mock_update_file = mocker.patch('helpers.Project.update_file', return_value=None)
|
||||
mocker.patch('helpers.Project.File')
|
||||
|
||||
project = create_project()
|
||||
|
||||
# When
|
||||
result = project.save_file(data)
|
||||
project.save_file(data)
|
||||
|
||||
assert result == ''
|
||||
|
||||
# Then assert that update_file with the correct path
|
||||
expected_saved_to = test_data['saved_to']
|
||||
# mock_update_file.assert_called_once_with(expected_saved_to, 'Hello World!')
|
||||
mock_update_file.assert_called_once_with(expected_saved_to, 'Hello World!')
|
||||
|
||||
|
||||
# Also assert that File.insert was called with the expected arguments
|
||||
|
||||
Reference in New Issue
Block a user