comparison doc/commands.txt @ 733:59e67e5df620

Documentation for `python:coverage` was missing for some unknown reason. Added now.
author osimons
date Sat, 13 Feb 2010 13:05:28 +0000
parents 0c4fec90c8e2
children 673ec182679d
comparison
equal deleted inserted replaced
731:9b5630fdd35e 733:59e67e5df620
705 .. code-block:: xml 705 .. code-block:: xml
706 706
707 <python:distutils command="unittest" options=" 707 <python:distutils command="unittest" options="
708 --xml-output build/test-results.xml 708 --xml-output build/test-results.xml
709 --coverage-summary build/test-coverage.txt 709 --coverage-summary build/test-coverage.txt
710 --coverage-dir build/coverage"/> 710 --coverage-dir build/coverage
711 --coverage-method trace"/>
711 712
712 Instructs `distutils` to run the ``unittest`` command (which is provided by 713 Instructs `distutils` to run the ``unittest`` command (which is provided by
713 Bitten), and passes the options needed to determine the output paths for test 714 Bitten), and passes the options needed to determine the output paths for test
714 results and code coverage reports. 715 results and code coverage reports.
715 716
717 Option ``--coverage-method`` is one of ``trace``, ``coverage`` or ``figleaf``.
718
716 Configuration 719 Configuration
717 ------------- 720 -------------
718 721
719 .. code-block:: ini 722 .. code-block:: ini
720 723
766 769
767 +--------------+-------------------------------------------------------------+ 770 +--------------+-------------------------------------------------------------+
768 | Name | Description | 771 | Name | Description |
769 +==============+=============================================================+ 772 +==============+=============================================================+
770 | ``summary`` | Path to the summary file written by ``trace.py``, | 773 | ``summary`` | Path to the summary file written by ``trace.py``, |
771 | | relative to the project source directory. | 774 | | relative to the project source directory. |
772 +--------------+-------------------------------------------------------------+ 775 +--------------+-------------------------------------------------------------+
773 | ``coverdir`` | Path to the directory containing the coverage files written | 776 | ``coverdir`` | Path to the directory containing the coverage files written |
774 | | by ``trace.py``, relative to the project source directory. | 777 | | by ``trace.py``, relative to the project source directory. |
775 +--------------+-------------------------------------------------------------+ 778 +--------------+-------------------------------------------------------------+
776 | ``include`` | List of glob patterns (separated by space) that specify | 779 | ``include`` | List of glob patterns (separated by space) that specify |
787 .. code-block:: xml 790 .. code-block:: xml
788 791
789 <python:trace summary="build/trace.out" coverdir="build/coverage" /> 792 <python:trace summary="build/trace.out" coverdir="build/coverage" />
790 793
791 794
795 ---------------------
796 ``<python:coverage>``
797 ---------------------
798
799 Extract data from a coverage.py_ run.
800
801 .. _coverage.py: http://nedbatchelder.com/code/coverage/
802
803 Parameters
804 ----------
805
806 +--------------+-------------------------------------------------------------+
807 | Name | Description |
808 +==============+=============================================================+
809 | ``summary`` | Path to the summary file with ``coverage.py`` information, |
810 | | relative to the project source directory. |
811 +--------------+-------------------------------------------------------------+
812 | ``coverdir`` | Path to the directory containing per-module coverage |
813 | | details, relative to the project source directory. |
814 +--------------+-------------------------------------------------------------+
815 | ``include`` | List of glob patterns (separated by space) that specify |
816 | | which Python file should be included in the coverage report |
817 +--------------+-------------------------------------------------------------+
818 | ``exclude`` | List of glob patterns (separated by space) that specify |
819 | | which Python file should be excluded from the coverage |
820 | | report |
821 +--------------+-------------------------------------------------------------+
822
823 Examples
824 --------
825
826 .. code-block:: xml
827
828 <step id="test" description="Unittests with coverage.py information">
829 <python:distutils command="unittest"
830 options="--xml-output build/test-results.xml
831 --coverage-summary build/test-coverage.txt
832 --coverage-dir build/coverage
833 --coverage-method coverage" />
834 <python:unittest file="build/test-results.xml"/>
835 <python:coverage summary="build/test-coverage.txt"
836 coverdir="build/coverage"
837 include="mypackage/*" exclude="*/tests/*" />
838 </step>
839
840
792 -------------------- 841 --------------------
793 ``<python:figleaf>`` 842 ``<python:figleaf>``
794 -------------------- 843 --------------------
795 844
796 Extracts coverage information recorded by Figleaf_. 845 Extracts coverage information recorded by Figleaf_.
802 851
803 +--------------+-------------------------------------------------------------+ 852 +--------------+-------------------------------------------------------------+
804 | Name | Description | 853 | Name | Description |
805 +==============+=============================================================+ 854 +==============+=============================================================+
806 | ``summary`` | Path to the summary file written by ``figleaf``, | 855 | ``summary`` | Path to the summary file written by ``figleaf``, |
807 | | relative to the project source directory. | 856 | | relative to the project source directory. |
808 +--------------+-------------------------------------------------------------+ 857 +--------------+-------------------------------------------------------------+
809 | ``include`` | List of glob patterns (separated by space) that specify | 858 | ``include`` | List of glob patterns (separated by space) that specify |
810 | | which Python file should be included in the coverage report | 859 | | which Python file should be included in the coverage report |
811 +--------------+-------------------------------------------------------------+ 860 +--------------+-------------------------------------------------------------+
812 | ``exclude`` | List of glob patterns (separated by space) that specify | 861 | ``exclude`` | List of glob patterns (separated by space) that specify |
Copyright (C) 2012-2017 Edgewall Software