Changeset f6fd413 in sasmodels
- Timestamp:
- Feb 7, 2018 12:41:04 PM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- c11d09f
- Parents:
- b4272a2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
conftest.py
rb3af1c2 rf6fd413 17 17 18 18 import os.path 19 import inspect 19 20 20 21 import pytest 21 22 from _pytest.unittest import TestCaseFunction 22 from _pytest.compat import is_generator23 23 24 24 def pytest_pycollect_makeitem(collector, name, obj): … … 55 55 tests.append(test) 56 56 return tests 57 58 def is_generator(func): 59 """ 60 Returns True if function has yield. 61 """ 62 # Cribbed from _pytest.compat is_generator and iscoroutinefunction; these 63 # may not be available as part of pytest 4. 64 coroutine = (getattr(func, '_is_coroutine', False) or 65 getattr(inspect, 'iscoroutinefunction', lambda f: False)(func)) 66 generator = inspect.isgeneratorfunction(func) 67 return generator and not coroutine 57 68 58 69 def split_yielded_test(obj, number):
Note: See TracChangeset
for help on using the changeset viewer.