• S sverchok
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 148
    • Задачи 148
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 21
    • Запросы на слияние 21
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • nikitronn
  • sverchok
  • Запросы на слияние
  • !2858

Introduce optional coverage reports.

  • Ревью изменений

  • Скачать
  • Почтовые патчи
  • Простое отличие
Слиты nikitronn запросил слияние coverage в master Фев 02, 2020
  • Обзор 5
  • Коммиты 1
  • Конвейеры 0
  • Изменения 2

Created by: portnov

htmlcov.zip This adds a possibility to generate code coverage reports from our tests. Coverage reports are generated by well-known Python module named coverage. The module is not within Blender distribution, and may be this is even good: you have to install the module if you want to see reports, otherwise you don't have to bother.

It does not make sense to look at global coverage numbers (they are low for Sverchok anyway); but it may be very useful to look at the report for the code you are about to change. In the ideal world, if the code is not marked red, you may change it without any fear: if you break, you will see it in failing tests. Many of our tests are not very good (for example, ones that import json examples, do not actually check what is the result of node tree processing); but for a dynamic language such as python, if you know that the code was run during the test, then you at least know that there are no trivial errors such as undeclared variables.

How to use

  1. Install pip: https://github.com/nortikin/sverchok/wiki/Non-standard-Python-modules-installation
  2. Install coverage:
/path/to/blender/2.xx/python/bin/python3.7m -m pip install coverage
  1. Run tests:
BLENDER=/path/to/blender/blender ./run_tests.sh
  1. Look at coverage reports under htmlcov/index.html.

FYI: @zeffii @Durman @vicdoval

Preflight checklist

Put an x letter in each brackets when you're done this item:

  • Code changes complete.
  • Code documentation complete.
  • Documentation for users complete (or not required, if user never sees these changes).
  • Manual testing done.
  • Unit-tests implemented.
  • Ready for merge.
Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: coverage