Examples

Importing

pytests

pytest junit file

<testsuite errors="0" failures="0" name="pytest" skips="10" tests="10" time="0.054">
    <testcase classname="setup" file="setup.py" line="-1" name="FLAKE8" time="0.000252246856689">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a8a0e950>
        </skipped>
    </testcase>
    <testcase classname="docs.conf" file="docs/conf.py" line="-1" name="FLAKE8" time="0.000167846679688">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a8a0ea10>
        </skipped>
    </testcase>
    <testcase classname="sphinxcontrib.__init__" file="sphinxcontrib/__init__.py" line="-1" name="FLAKE8" time="0.000164031982422">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a8497450>
        </skipped>
    </testcase>
    <testcase classname="sphinxcontrib.test_reports.__init__" file="sphinxcontrib/test_reports/__init__.py" line="-1" name="FLAKE8" time="0.000192880630493">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a8497c10>
        </skipped>
    </testcase>
    <testcase classname="sphinxcontrib.test_reports.junitparser" file="sphinxcontrib/test_reports/junitparser.py" line="-1" name="FLAKE8" time="0.00017786026001">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a84a2350>
        </skipped>
    </testcase>
    <testcase classname="sphinxcontrib.test_reports.test_reports" file="sphinxcontrib/test_reports/test_reports.py" line="-1" name="FLAKE8" time="0.000218152999878">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a84a2a50>
        </skipped>
    </testcase>
    <testcase classname="sphinxcontrib.test_reports.directives.__init__" file="sphinxcontrib/test_reports/directives/__init__.py" line="-1" name="FLAKE8" time="0.000204801559448">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a84a2cd0>
        </skipped>
    </testcase>
    <testcase classname="sphinxcontrib.test_reports.directives.test_env" file="sphinxcontrib/test_reports/directives/test_env.py" line="-1" name="FLAKE8" time="0.000218868255615">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a84ae250>
        </skipped>
    </testcase>
    <testcase classname="sphinxcontrib.test_reports.directives.test_report" file="sphinxcontrib/test_reports/directives/test_report.py" line="-1" name="FLAKE8" time="0.000199317932129">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a84ae950>
        </skipped>
    </testcase>
    <testcase classname="sphinxcontrib.test_reports.directives.test_results" file="sphinxcontrib/test_reports/directives/test_results.py" line="-1" name="FLAKE8" time="0.00019097328186">
        <skipped message="file(s) previously passed FLAKE8 checks" type="pytest.skip">
        /home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: &lt;py._xmlgen.raw object at 0x7fd5a84bf090>
        </skipped>
    </testcase>
</testsuite>

Autogenerated documentation

.. test-file:: Pytest Test File
   :id: PYTEST01
   :tags: pytest, example
   :file: ../tests/data/pytest_data.xml
   :auto_suites:
   :auto_cases:
Test-File: Pytest Test File PYTEST01
tags: pytest example
file: ../tests/data/pytest_data.xml
suites: 1
cases: 10
passed: 0
skipped: 10
failed: 0
errors: 0
Test-Suite: pytest PYTEST01_0EA
tags: pytest example
file: ../tests/data/pytest_data.xml
suite: pytest
cases: 10
passed: 0
skipped: 10
failed: 0
errors: 0
Test-Case: FLAKE8 PYTEST01_0EA_D962E
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: setup
time: 0.000252246856689
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a8a0e950>

Message:

file(s) previously passed FLAKE8 checks
Test-Case: FLAKE8 PYTEST01_0EA_BCA04
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: docs.conf
time: 0.000167846679688
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a8a0ea10>

Message:

file(s) previously passed FLAKE8 checks
Test-Case: FLAKE8 PYTEST01_0EA_5B0AB
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: sphinxcontrib.__init__
time: 0.000164031982422
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a8497450>

Message:

file(s) previously passed FLAKE8 checks
Test-Case: FLAKE8 PYTEST01_0EA_17650
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: sphinxcontrib.test_reports.__init__
time: 0.000192880630493
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a8497c10>

Message:

file(s) previously passed FLAKE8 checks
Test-Case: FLAKE8 PYTEST01_0EA_44574
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: sphinxcontrib.test_reports.junitparser
time: 0.00017786026001
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a84a2350>

Message:

file(s) previously passed FLAKE8 checks
Test-Case: FLAKE8 PYTEST01_0EA_52AB6
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: sphinxcontrib.test_reports.test_reports
time: 0.000218152999878
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a84a2a50>

Message:

file(s) previously passed FLAKE8 checks
Test-Case: FLAKE8 PYTEST01_0EA_03B18
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: sphinxcontrib.test_reports.directives.__init__
time: 0.000204801559448
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a84a2cd0>

Message:

file(s) previously passed FLAKE8 checks
Test-Case: FLAKE8 PYTEST01_0EA_D9167
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: sphinxcontrib.test_reports.directives.test_env
time: 0.000218868255615
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a84ae250>

Message:

file(s) previously passed FLAKE8 checks
Test-Case: FLAKE8 PYTEST01_0EA_8E5DB
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: sphinxcontrib.test_reports.directives.test_report
time: 0.000199317932129
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a84ae950>

Message:

file(s) previously passed FLAKE8 checks
Test-Case: FLAKE8 PYTEST01_0EA_E5144
tags: pytest example
style: tr_skipped
file: ../tests/data/pytest_data.xml
suite: pytest
case: FLAKE8
case_name: FLAKE8
classname: sphinxcontrib.test_reports.directives.test_results
time: 0.00019097328186
result: skipped

Text:

/home/daniel/workspace/sphinx/sphinx-test-reports/.tox/py27-sphinx15/local/lib/python2.7/site-packages/pytest_flake8.py:106: <py._xmlgen.raw object at 0x7fd5a84bf090>

Message:

file(s) previously passed FLAKE8 checks

nosetests

nosetests junit file

<testsuite name="nosetests" tests="5" errors="0" failures="0" skip="0">
    <testcase classname="test_basic_doc" name="test_doc_build_html" time="0.283"/>
    <testcase classname="test_dummy" name="test_dummy" time="0.000"/>
    <testcase classname="test_empty_doc" name="test_doc_build_html" time="0.108"/>
    <testcase classname="test_junit_parser" name="test_init_parser" time="0.001"/>
    <testcase classname="test_junit_parser" name="test_xml_object" time="0.001"/>
</testsuite>

Autogenerated documentation

.. test-file:: Nosetests Test File
   :id: NOSE01
   :tags: nose, example
   :file: ../tests/data/nose_data.xml
   :auto_suites:
   :auto_cases:
Test-File: Nosetests Test File NOSE01
tags: nose example
file: ../tests/data/nose_data.xml
suites: 1
cases: 5
passed: 5
skipped: 0
failed: 0
errors: 0
Test-Suite: nosetests NOSE01_ED0
tags: nose example
file: ../tests/data/nose_data.xml
suite: nosetests
cases: 5
passed: 5
skipped: 0
failed: 0
errors: 0
Test-Case: test_doc_build_html NOSE01_ED0_9DB1E
tags: nose example
style: tr_passed
file: ../tests/data/nose_data.xml
suite: nosetests
case: test_doc_build_html
case_name: test_doc_build_html
classname: test_basic_doc
time: 0.283
result: passed
Test-Case: test_dummy NOSE01_ED0_53735
tags: nose example
style: tr_passed
file: ../tests/data/nose_data.xml
suite: nosetests
case: test_dummy
case_name: test_dummy
classname: test_dummy
time: 0.0
result: passed
Test-Case: test_doc_build_html NOSE01_ED0_AA5A7
tags: nose example
style: tr_passed
file: ../tests/data/nose_data.xml
suite: nosetests
case: test_doc_build_html
case_name: test_doc_build_html
classname: test_empty_doc
time: 0.108
result: passed
Test-Case: test_init_parser NOSE01_ED0_DBF95
tags: nose example
style: tr_passed
file: ../tests/data/nose_data.xml
suite: nosetests
case: test_init_parser
case_name: test_init_parser
classname: test_junit_parser
time: 0.001
result: passed
Test-Case: test_xml_object NOSE01_ED0_0D304
tags: nose example
style: tr_passed
file: ../tests/data/nose_data.xml
suite: nosetests
case: test_xml_object
case_name: test_xml_object
classname: test_junit_parser
time: 0.001
result: passed

Filtering

Tables

Tags must include pytest

.. needtable::
   :tags: pytest
   :columns: id, title, result, time, tags

ID

Title

Result

Time

Tags

TESTFILE_3

nose test data

pytest; data; awesome

PYTEST01

Pytest Test File

pytest; example

PYTEST01_0EA

pytest

pytest; example

PYTEST01_0EA_D962E

FLAKE8

skipped

0.000252246856689

pytest; example

PYTEST01_0EA_BCA04

FLAKE8

skipped

0.000167846679688

pytest; example

PYTEST01_0EA_5B0AB

FLAKE8

skipped

0.000164031982422

pytest; example

PYTEST01_0EA_17650

FLAKE8

skipped

0.000192880630493

pytest; example

PYTEST01_0EA_44574

FLAKE8

skipped

0.00017786026001

pytest; example

PYTEST01_0EA_52AB6

FLAKE8

skipped

0.000218152999878

pytest; example

PYTEST01_0EA_03B18

FLAKE8

skipped

0.000204801559448

pytest; example

PYTEST01_0EA_D9167

FLAKE8

skipped

0.000218868255615

pytest; example

PYTEST01_0EA_8E5DB

FLAKE8

skipped

0.000199317932129

pytest; example

PYTEST01_0EA_E5144

FLAKE8

skipped

0.00019097328186

pytest; example

Must be defined on this page

This checks if the filtered needs (test-files, test-suites, test-cases) got defined inside a section called “Importing”.

.. needtable::
   :filter: 'Importing' in sections
   :columns: id, title, result, time, tags

ID

Title

Result

Time

Tags

PYTEST01

Pytest Test File

pytest; example

PYTEST01_0EA

pytest

pytest; example

PYTEST01_0EA_D962E

FLAKE8

skipped

0.000252246856689

pytest; example

PYTEST01_0EA_BCA04

FLAKE8

skipped

0.000167846679688

pytest; example

PYTEST01_0EA_5B0AB

FLAKE8

skipped

0.000164031982422

pytest; example

PYTEST01_0EA_17650

FLAKE8

skipped

0.000192880630493

pytest; example

PYTEST01_0EA_44574

FLAKE8

skipped

0.00017786026001

pytest; example

PYTEST01_0EA_52AB6

FLAKE8

skipped

0.000218152999878

pytest; example

PYTEST01_0EA_03B18

FLAKE8

skipped

0.000204801559448

pytest; example

PYTEST01_0EA_D9167

FLAKE8

skipped

0.000218868255615

pytest; example

PYTEST01_0EA_8E5DB

FLAKE8

skipped

0.000199317932129

pytest; example

PYTEST01_0EA_E5144

FLAKE8

skipped

0.00019097328186

pytest; example

NOSE01

Nosetests Test File

nose; example

NOSE01_ED0

nosetests

nose; example

NOSE01_ED0_9DB1E

test_doc_build_html

passed

0.283

nose; example

NOSE01_ED0_53735

test_dummy

passed

0.0

nose; example

NOSE01_ED0_AA5A7

test_doc_build_html

passed

0.108

nose; example

NOSE01_ED0_DBF95

test_init_parser

passed

0.001

nose; example

NOSE01_ED0_0D304

test_xml_object

passed

0.001

nose; example

Flows

All test-files and suites

This shows all testfiles and testsuites, which are defined somewhere in the overall documentation.

Please note to search for testfile and testsuite (no “-” ), as this are the names of the need-objects Sphinx-Test-Reports creates when using the directives test-file or test-suite.

.. needflow::
   :types: testfile, testsuite
   :filter: 'Examples' in sections

@startuml
node "<size:12>Test-File</size>\n**Pytest Test**\n**File**\n<size:10>PYTEST01</size>" as PYTEST01 [[.._examples_index.html?highlight_Pytest+Test+File_PYTEST01]] #ffffff {
  }
folder "<size:12>Test-Suite</size>\n**pytest**\n<size:10>PYTEST01_0EA</size>" as PYTEST01_0EA [[.._examples_index.html?highlight_pytest_PYTEST01_0EA]] #cccccc {
  }
node "<size:12>Test-File</size>\n**Nosetests Test**\n**File**\n<size:10>NOSE01</size>" as NOSE01 [[.._examples_index.html?highlight_Nosetests+Test+File_NOSE01]] #ffffff {
  }
folder "<size:12>Test-Suite</size>\n**nosetests**\n<size:10>NOSE01_ED0</size>" as NOSE01_ED0 [[.._examples_index.html?highlight_nosetests_NOSE01_ED0]] #cccccc {
  }
PYTEST01_0EA --> PYTEST01
NOSE01_ED0 --> NOSE01
@enduml