test: add comprehensive unit tests and fix bare excepts

- Added comprehensive unit test suite covering AI, core, plugins, completion, API, and hooks using pytest.
- Replaced bare 'except:' clauses across the codebase with specific exception handling (e.g., ValueError, KeyError, OSError) to prevent swallowing system exit calls.
- Fixed Python 3.8+ AST compatibility in plugins.py (support for ast.Constant).
- Removed deprecated pkg_resources import from __init__.py.
- Fixed missing 'printer' import in configfile.py that caused NameErrors during save failures.
This commit is contained in:
2026-04-03 17:11:45 -03:00
parent 7de6003435
commit cf95befb43
21 changed files with 2490 additions and 56 deletions
+5
View File
@@ -0,0 +1,5 @@
[pytest]
testpaths = connpy/tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*