mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2026-01-22 23:14:19 +01:00
⏪ fix: fix bring back the test description for func generation
This commit is contained in:
20
test/unit/test_packages.py
Normal file
20
test/unit/test_packages.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from dev_gpt.options.generate.generator import Generator
|
||||
|
||||
def test_package_parsing():
|
||||
packages_json_string = '''\
|
||||
[
|
||||
["PyPDF2", "gpt_3_5_turbo"],
|
||||
["pdfminer.six", "gpt_3_5_turbo"],
|
||||
["tika", "gpt_3_5_turbo"],
|
||||
[],
|
||||
["gpt_3_5_turbo"]
|
||||
]'''
|
||||
|
||||
parsed_packages = Generator.process_packages_json_string(packages_json_string)
|
||||
for parsed, expected in zip(parsed_packages, [
|
||||
['pypdf2', 'gpt_3_5_turbo'],
|
||||
['pdfminer.six', 'gpt_3_5_turbo'],
|
||||
[],
|
||||
['gpt_3_5_turbo'],
|
||||
]):
|
||||
assert set(parsed) == set(expected)
|
||||
Reference in New Issue
Block a user