-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (30 loc) · 788 Bytes
/
main.py
File metadata and controls
41 lines (30 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import pytest
from pathlib import Path
def run_tests():
"""
Run test suite for database operations.
Configures and executes pytest with:
- Verbose output
- Automatic asyncio mode
- Suppressed deprecation warnings
Returns
-------
int
pytest exit code (0 for success, 1 for failures)
"""
test_path = str(Path(__file__).parent / 'tests')
return pytest.main([
test_path,
'-v',
'--asyncio-mode=auto',
'-W', 'ignore::DeprecationWarning',
])
def main():
"""Main entry point for test execution."""
exit_code = run_tests()
if exit_code == 0:
print('✅ All tests passed successfully!')
else:
print('❌ Some tests failed!')
if __name__ == '__main__':
main()