-
Notifications
You must be signed in to change notification settings - Fork 17
test: add initial unit tests and code coverage support #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6597c67
to
7e1ed3d
Compare
rebased to master |
651f9b2
to
9087358
Compare
d9e3881
to
75892f0
Compare
75892f0
to
63c0c5f
Compare
308ea40
to
34ca4be
Compare
8d084f0
to
815e0f4
Compare
3ba7910
to
28cd898
Compare
Patch introduces integration with coverage.py module [1] that allows to gather code coverage and build a simple report about covered statements and branches. We have a test-run.py module itself and also we have Python helpers for Tarantool tests written in Python. These Python tests runs a separate processes using subprocess module. To make it possible to gather code coverage for a separate processes option 'concurrency' added to .coveragerc. Additionally patch introduces integration with Coveralls service using python-coveralls module [2] that allows to evaluate incremental code coverage changes like we do it for Tarantool [3]. Code coverage for test-run is available on a public page by URL [4]. Name Stmts Miss Branch BrPart Cover ----------------------------------------------------------------- dispatcher.py 281 50 94 12 78.1% lib/__init__.py 45 0 6 1 98.0% lib/admin_connection.py 71 9 22 7 82.8% lib/app_server.py 162 45 38 11 67.0% lib/box_connection.py 54 22 12 1 50.0% lib/colorer.py 111 28 42 6 68.6% lib/connpool.py 85 54 18 1 35.0% lib/inspector.py 81 13 26 4 80.4% lib/options.py 81 15 18 6 78.8% lib/preprocessor.py 329 162 162 40 44.6% lib/pytap13.py 128 48 58 18 55.9% lib/server.py 111 23 40 12 74.2% lib/server_mixins.py 126 83 28 0 27.9% lib/tarantool_connection.py 126 28 22 5 75.0% lib/tarantool_server.py 729 237 268 65 61.5% lib/test.py 249 111 86 17 48.1% lib/test_suite.py 191 35 68 19 77.6% lib/unittest_server.py 63 6 10 4 86.3% lib/utils.py 216 76 86 19 59.9% lib/worker.py 251 81 70 15 60.7% listeners.py 205 78 70 6 60.0% test-run.py 149 76 44 9 42.5% ----------------------------------------------------------------- TOTAL 3844 1280 1288 278 61.2% 1. https://coverage.readthedocs.io/en/latest/config.html 2. https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support 3. https://coveralls.io/github/tarantool/tarantool 4. https://coveralls.io/github/tarantool/test-run
28cd898
to
394472d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I have no objections anymore.
I'll look again just in case and push.
There are several updates in test-run: * Unit testing and coverage collecting for test-run ([1]). (Plus a fixup for `--disable-schema-upgrade` for Python 3.5.) * Allow to miss a timeout in test_run:wait_log(): it is 60 seconds by default ([2]). * pretest_clean: add built-in `UUID()` SQL function ([3]). [1]: tarantool/test-run#283 [2]: tarantool/test-run#306 [3]: tarantool/test-run#307
There are several updates in test-run: * Unit testing and coverage collecting for test-run ([1]). (Plus a fixup for `--disable-schema-upgrade` for Python 3.5.) * Allow to miss a timeout in test_run:wait_log(): it is 60 seconds by default ([2]). * pretest_clean: add built-in `UUID()` SQL function ([3]). [1]: tarantool/test-run#283 [2]: tarantool/test-run#306 [3]: tarantool/test-run#307 (cherry picked from commit 0f44ede)
There are several updates in test-run: * Unit testing and coverage collecting for test-run ([1]). (Plus a fixup for `--disable-schema-upgrade` for Python 3.5.) * Allow to miss a timeout in test_run:wait_log(): it is 60 seconds by default ([2]). * pretest_clean: add built-in `UUID()` SQL function ([3]). [1]: tarantool/test-run#283 [2]: tarantool/test-run#306 [3]: tarantool/test-run#307 (cherry picked from commit 0f44ede)
There are several updates in test-run: * Unit testing and coverage collecting for test-run ([1]). (Plus a fixup for `--disable-schema-upgrade` for Python 3.5.) * Allow to miss a timeout in test_run:wait_log(): it is 60 seconds by default ([2]). * pretest_clean: add built-in `UUID()` SQL function ([3]). [1]: tarantool/test-run#283 [2]: tarantool/test-run#306 [3]: tarantool/test-run#307 (cherry picked from commit 0f44ede)
Does not matter much here, but anyway: Updated the test-run submodule in tarantool in the following commits: 2.9.0-45-g0f44ede23, 2.8.1-23-g1b632d36c, 2.7.2-18-g9221e0e28, 1.10.10-10-gbc8463d67. |
There are several updates in test-run: * Unit testing and coverage collecting for test-run ([1]). (Plus a fixup for `--disable-schema-upgrade` for Python 3.5.) * Allow to miss a timeout in test_run:wait_log(): it is 60 seconds by default ([2]). * pretest_clean: add built-in `UUID()` SQL function ([3]). [1]: tarantool/test-run#283 [2]: tarantool/test-run#306 [3]: tarantool/test-run#307
There are several updates in test-run: * Unit testing and coverage collecting for test-run ([1]). (Plus a fixup for `--disable-schema-upgrade` for Python 3.5.) * Allow to miss a timeout in test_run:wait_log(): it is 60 seconds by default ([2]). * pretest_clean: add built-in `UUID()` SQL function ([3]). [1]: tarantool/test-run#283 [2]: tarantool/test-run#306 [3]: tarantool/test-run#307
No description provided.