Changeset bb4ff2a in sasmodels


Ignore:
Timestamp:
Jan 26, 2018 10:45:35 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
42158d2
Parents:
ecb485c
Message:

work around travis/appveyor limitations for pytest

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • .travis.yml

    ra69d8cd rbb4ff2a  
    3838- conda info -a 
    3939# 2018-01-26 PAK: sasmodels uses yield generator for tests, which isn't supported in pytest 4+ 
    40 - conda install --yes python=$PY numpy scipy cython mako cffi "pytest<4" 
     40- conda install --yes python=$PY numpy scipy cython mako docutils cffi "pytest<4" 
    4141install: 
    4242- pip install bumps 
  • appveyor.yml

    ra69d8cd rbb4ff2a  
    6969    # 2018-01-19 PAK: skipping toolchain cython and cffi (these were for pyopencl?) 
    7070    # 2018-01-26 PAK: sasmodels uses yield generator for tests, which isn't supported in pytest 4+ 
    71     - cmd: conda install --yes --quiet numpy scipy "pytest<4" 
     71    - cmd: conda install --yes --quiet numpy scipy docutils "pytest<4" 
    7272    # 2018-01-19 PAK: skipping pyopencl; this would be needed for deploy but maybe not for test 
    7373    #- cmd: conda install --yes --channel conda-forge pyopencl 
  • conftest.py

    ra69d8cd rbb4ff2a  
    1111test specifically from the py.test command line. [This is perhaps because 
    1212the modifyitems hook is only called after test selection.] 
     13 
     14*pytest_ignore_collect* skips kernelcl.py if pyopencl cannot be imported. 
    1315""" 
    1416from __future__ import print_function 
    1517 
     18import os.path 
     19 
    1620import pytest 
    1721from _pytest.unittest import TestCaseFunction 
     22 
     23try: 
     24    import pyopencl 
     25    TEST_PYOPENCL = True 
     26except ImportError: 
     27    TEST_PYOPENCL = False 
     28 
     29def pytest_ignore_collect(path, config): 
     30    ignore = TEST_PYOPENCL and path.basename == "kernelcl.py" 
     31    return ignore 
    1832 
    1933USE_DOCSTRING_AS_DESCRIPTION = True 
Note: See TracChangeset for help on using the changeset viewer.