|
17 | 17 | # You should have received a copy of the GNU Lesser Public License |
18 | 18 | # along with this program. If not, see [http://www.gnu.org/licenses/]. |
19 | 19 | import os |
20 | | -import subprocess |
21 | 20 | import sys |
22 | 21 | from platform import python_implementation |
23 | 22 |
|
|
26 | 25 |
|
27 | 26 | def call_pre_commit_hook(hook_id): |
28 | 27 | __tracebackhide__ = True |
29 | | - return os.system(' '.join(['pre-commit', 'run', '--all-files', hook_id])) |
| 28 | + return os.system(' '.join(['pre-commit', 'run', '--all-files', hook_id])) # pragma: no cover |
30 | 29 |
|
31 | 30 |
|
| 31 | +@pytest.mark.nocoverage |
32 | 32 | @pytest.mark.parametrize('hook_id', argvalues=('yapf', 'flake8', 'pylint')) |
33 | 33 | @pytest.mark.skipif(not os.getenv('TRAVIS'), reason='Not running in travis.') |
34 | 34 | @pytest.mark.skipif(not sys.version_info[:2] == (3, 6) or python_implementation() != 'CPython', |
35 | | - reason='Only running pre-commit-hooks on newest tested python version, ' |
36 | | - 'as they are slow and consistent across platforms.') |
| 35 | + reason='Only running pre-commit-hooks on newest tested python version, ' |
| 36 | + 'as they are slow and consistent across platforms.') |
37 | 37 | def test_pre_commit_hook(hook_id): |
38 | | - assert call_pre_commit_hook(hook_id) == 0 |
| 38 | + assert call_pre_commit_hook(hook_id) == 0 # pragma: no cover |
39 | 39 |
|
40 | 40 |
|
| 41 | +@pytest.mark.nocoverage |
| 42 | +@pytest.mark.skipif( |
| 43 | + not sys.version_info[:2] in ((3, 6), (2, 7)) or python_implementation() != 'CPython', |
| 44 | + reason='Only testing build on 2.7 and 3.6') |
41 | 45 | def test_build(): |
42 | | - assert os.system('python setup.py bdist_dumb') == 0 |
| 46 | + assert os.system('python setup.py bdist_dumb') == 0 # pragma: no cover |
0 commit comments