Page MenuHomePhabricator

Add coverage reports to py.test runner
ClosedPublic

Authored by zeeg on Apr 2 2014, 1:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 10:43 AM
Unknown Object (File)
Sun, Dec 15, 6:37 AM
Unknown Object (File)
Wed, Dec 11, 7:05 AM
Unknown Object (File)
Mon, Dec 9, 3:24 PM
Unknown Object (File)
Fri, Dec 6, 12:57 PM
Unknown Object (File)
Fri, Dec 6, 12:39 AM
Unknown Object (File)
Thu, Nov 28, 5:00 AM
Unknown Object (File)
Wed, Nov 27, 4:34 PM
Subscribers

Details

Summary

Of note this now forces the pytest-cov plugin to be installed unless they turn it off.

Test Plan
../arcanist/bin/arc unit

COVERAGE REPORT
     97%     changes/models/test.py
    100%     tests/changes/api/serializer/models/test_testcase.py
    100%     changes/api/serializer/models/testcase.py
 UNIT OKAY  No unit test failures.
Updated an existing Differential revision:
        Revision URI: https://tails.corp.dropbox.com/D43387

Included changes:
  M       changes/api/serializer/models/testcase.py
  M       changes/models/test.py
  M       tests/changes/api/serializer/models/test_testcase.py

Diff Detail

Repository
rARC Arcanist
Branch
pytest-cover
Lint
Lint Passed
Unit
Tests Passed

Event Timeline

zeeg retitled this revision from to Add coverage reports to py.test runner.
zeeg updated this object.
zeeg edited the test plan for this revision. (Show Details)
zeeg added a reviewer: epriestley.

See also IRC. If there's no way to do anything but coverage.xml, this is fine. You shouldn't need to unlink the temp file.

src/unit/engine/PytestTestEngine.php
15

Why are we putting this at the project root? That seems really messy/gross? Can we just use a temp file like $junit_tmp?

17–18

Use Filesystem::remove($file). But this should not be necessary with the above change.

zeeg edited edge metadata.

Rely on coverage external binary so we can specify a tmp file for xml

do something about csprintf that I dont understand

epriestley edited edge metadata.
This revision is now accepted and ready to land.Apr 2 2014, 6:31 PM
epriestley updated this revision to Diff 20569.

Closed by commit rARCb8e42614559b (authored by @zeeg, committed by @epriestley).