Skip to content
Snippets Groups Projects
Commit b0763b97 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fix coverage

parent bbcf559d
No related branches found
No related tags found
No related merge requests found
...@@ -6,16 +6,15 @@ before_script: ...@@ -6,16 +6,15 @@ before_script:
- ./cc-test-reporter before-build - ./cc-test-reporter before-build
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install pytest mock coverage cython[coverage] pytest-cov - pip install pytest mock coverage cython[coverage] pytest-cov
- DEBUG=1 python setup.py install - DEBUG=1 python setup.py build_ext --inplace --force --define CYTHON_TRACE
- rm -rf minijson - rm -rf minijson
jobs: jobs:
include: include:
- stage: test - stage: test
python: "3.8" python: "3.8"
script: script:
- py.test --cov - pytest --cov=./ --cov-report=xml
after_script: after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code ${TRAVIS_TEST_RESULT} - ./cc-test-reporter after-build -t coverage.py --exit-code ${TRAVIS_TEST_RESULT}
......
import os import os
from setuptools import find_packages from setuptools import find_packages
from distutils.core import setup from distutils.core import setup
from snakehouse import Multibuild, build, monkey_patch_parallel_compilation, find_pyx from snakehouse import Multibuild, build, find_pyx
monkey_patch_parallel_compilation()
build_kwargs = {} build_kwargs = {}
directives = {'language_level': '3'} directives = {'language_level': '3'}
dont_snakehouse = False dont_snakehouse = False
multi_kwargs = {}
if 'DEBUG' in os.environ: if 'DEBUG' in os.environ:
print('Enabling debug mode') print('Enabling debug mode')
dont_snakehouse = True dont_snakehouse = True
...@@ -17,8 +15,6 @@ if 'DEBUG' in os.environ: ...@@ -17,8 +15,6 @@ if 'DEBUG' in os.environ:
profile=True, profile=True,
linetrace=True, linetrace=True,
binding=True) binding=True)
multi_kwargs['define_macros'] = [('CYTHON_TRACE', '1'),
('CYTHON_TRACE_NOGIL', '1')]
import Cython.Compiler.Options import Cython.Compiler.Options
Cython.Compiler.Options.annotate = True Cython.Compiler.Options.annotate = True
...@@ -27,9 +23,7 @@ if 'DEBUG' in os.environ: ...@@ -27,9 +23,7 @@ if 'DEBUG' in os.environ:
setup(version='1.7', setup(version='1.7',
packages=find_packages(include=['minijson', 'minijson.*']), packages=find_packages(include=['minijson', 'minijson.*']),
ext_modules=build([Multibuild('minijson', find_pyx('minijson'), ext_modules=build([Multibuild('minijson', find_pyx('minijson'),
dont_snakehouse=dont_snakehouse, dont_snakehouse=dont_snakehouse), ],
**multi_kwargs), ],
compiler_directives=directives, **build_kwargs), compiler_directives=directives, **build_kwargs),
python_requires='!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*', python_requires='!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*',
zip_safe=False
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment