Skip to content

Commit

Permalink
Add some missing python version coverage exclusions.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Sep 23, 2024
1 parent d02f76a commit bc683c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/toga/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,14 @@ def _install_task_factory_wrapper(self):

def factory(loop, coro, context=None):
if platform_task_factory is not None:
if sys.version_info < (3, 11):
if sys.version_info < (3, 11): # pragma: no-cover-if-gte-py311
task = platform_task_factory(loop, coro)
else:
else: # pragma: no-cover-if-lt-py311
task = platform_task_factory(loop, coro, context=context)
else:
if sys.version_info < (3, 11):
if sys.version_info < (3, 11): # pragma: no-cover-if-gte-py311
task = asyncio.Task(coro, loop=loop)
else:
else: # pragma: no-cover-if-lt-py311
task = asyncio.Task(coro, loop=loop, context=context)

self._running_tasks.add(task)
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ exclude_lines = [
no-cover-if-missing-setuptools_scm = "not is_installed('setuptools_scm')"
no-cover-if-missing-PIL = "not is_installed('PIL')"
no-cover-if-PIL-installed = "is_installed('PIL')"
no-cover-if-lt-py311 = "sys_version_info < (3, 11) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-gte-py311 = "sys_version_info > (3, 11) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-lt-py310 = "sys_version_info < (3, 10) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-gte-py310 = "sys_version_info > (3, 10) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-lt-py39 = "sys_version_info < (3, 9) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
Expand Down

0 comments on commit bc683c2

Please sign in to comment.