mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-08-02 13:56:54 +00:00

Fixed various coding style stuff detected by flake8. Added .pre-commit-config.yaml: With command pre_commit install a hook for flake8 will be installed.
37 lines
849 B
Python
37 lines
849 B
Python
#!/usr/bin/env python -O
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import unittest
|
|
|
|
import mariadb
|
|
|
|
from test.base_test import create_connection
|
|
|
|
|
|
class TestConnection(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
self.connection = create_connection()
|
|
|
|
def tearDown(self):
|
|
del self.connection
|
|
|
|
def test_conpy_63(self):
|
|
version = mariadb.__version__
|
|
version_info = mariadb.__version_info__
|
|
|
|
str_version = list(map(str, version.split('.')))
|
|
|
|
self.assertEqual(int(str_version[0]), version_info[0])
|
|
self.assertEqual(int(str_version[1]), version_info[1])
|
|
|
|
# patch might contain letters
|
|
try:
|
|
self.assertEqual(int(str_version[2]), version_info[2])
|
|
except Exception:
|
|
self.assertEqual(str_version[2], version_info[2])
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|