File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1010 @isort --profile black ./src ./tests ./gitlab_bot.py
1111
1212test : lint
13- @pytest --cov=an_copilot tests
13+ @pytest --cov=src tests
1414
1515i18n :
1616 xgettext -d base -o src/locales/gitlab-bot.pot * .py
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ lint = [
3636 " isort>=5,<6" ,
3737 " black>=23,<24"
3838]
39+ test = [
40+ " pytest==7.4.3" ,
41+ " coverage==7.2.7" ,
42+ " pytest-cov==4.1.0"
43+ ]
3944package = [
4045 " flit==3.9.0"
4146]
Original file line number Diff line number Diff line change 11import json
2+ import os
23import unittest
34from unittest import TestCase
45
78
89class TestLLM (TestCase ):
910 def test_ai_diffs_summary (self ):
10- with open ("git_diff.json" , "r" ) as f :
11+ test_dir = os .path .dirname (os .path .abspath (__file__ ))
12+ file_path = os .path .join (test_dir , "git_diff.json" )
13+
14+ with open (file_path , "r" ) as f :
1115 git_diff_json = json .loads (f .read ())
1216 summary_report = ai_diffs_summary (git_diff_json )
1317 self .assertIn ("AI 摘要(实验)" , summary_report )
You can’t perform that action at this time.
0 commit comments