def test_html_report_delta__no_source():
    from pycobertura.reporters import HtmlReporterDelta
    cobertura1 = make_cobertura('tests/dummy.source1/coverage.xml')
    cobertura2 = make_cobertura('tests/dummy.source2/coverage.xml')
    report_delta = HtmlReporterDelta(cobertura1, cobertura2, show_source=False)
    html_output = report_delta.generate()
    assert ('Missing' not in html_output)
    assert ('<h4 id=' not in html_output)
    assert (remove_style_tag(html_output) == '<html>\n  <head>\n    <title>pycobertura report</title>\n    <meta charset="UTF-8">\n  </head>\n  <body>\n    <div class="container">\n      <table class="u-full-width">\n        <thead>\n          <tr>\n            <th>Filename</th>\n            <th>Stmts</th>\n            <th>Miss</th>\n            <th>Cover</th>\n          </tr>\n        </thead>\n        <tbody>\n          <tr>\n            <td><a href="#dummy/dummy.py">dummy/dummy.py</a></td>\n            <td>-</td>\n            <td><span class="green">-2</span></td>\n            <td>+40.00%</td>\n          </tr>\n          <tr>\n            <td><a href="#dummy/dummy2.py">dummy/dummy2.py</a></td>\n            <td>+2</td>\n            <td><span class="red">+1</span></td>\n            <td>-25.00%</td>\n          </tr>\n          <tr>\n            <td><a href="#dummy/dummy3.py">dummy/dummy3.py</a></td>\n            <td>+2</td>\n            <td><span class="red">+2</span></td>\n            <td>-</td>\n          </tr>\n        </tbody>\n        <tfoot>\n          <tr>\n            <td>TOTAL</td>\n            <td>+4</td>\n            <td><span class="red">+1</span></td>\n            <td>+31.06%</td>\n          </tr>\n        </tfoot>\n      </table>\n    </div>\n  </body>\n</html>')
def test_html_report_delta__no_source():
    from pycobertura.reporters import HtmlReporterDelta
    cobertura1 = make_cobertura('tests/dummy.source1/coverage.xml')
    cobertura2 = make_cobertura('tests/dummy.source2/coverage.xml')
    report_delta = HtmlReporterDelta(cobertura1, cobertura2, show_source=False)
    html_output = report_delta.generate()
    assert ('Missing' not in html_output)
    assert ('<h4 id=' not in html_output)
    assert (remove_style_tag(html_output) == '<html>\n  <head>\n    <title>pycobertura report</title>\n    <meta charset="UTF-8">\n  </head>\n  <body>\n    <div class="container">\n      <table class="u-full-width">\n        <thead>\n          <tr>\n            <th>Filename</th>\n            <th>Stmts</th>\n            <th>Miss</th>\n            <th>Cover</th>\n          </tr>\n        </thead>\n        <tbody>\n          <tr>\n            <td><a href="#dummy/dummy.py">dummy/dummy.py</a></td>\n            <td>-</td>\n            <td><span class="green">-2</span></td>\n            <td>+40.00%</td>\n          </tr>\n          <tr>\n            <td><a href="#dummy/dummy2.py">dummy/dummy2.py</a></td>\n            <td>+2</td>\n            <td><span class="red">+1</span></td>\n            <td>-25.00%</td>\n          </tr>\n          <tr>\n            <td><a href="#dummy/dummy3.py">dummy/dummy3.py</a></td>\n            <td>+2</td>\n            <td><span class="red">+2</span></td>\n            <td>-</td>\n          </tr>\n        </tbody>\n        <tfoot>\n          <tr>\n            <td>TOTAL</td>\n            <td>+4</td>\n            <td><span class="red">+1</span></td>\n            <td>+31.06%</td>\n          </tr>\n        </tfoot>\n      </table>\n    </div>\n  </body>\n</html>')