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)
Sat, Apr 20, 6:42 PM
Unknown Object (File)
Wed, Apr 17, 8:18 PM
Unknown Object (File)
Thu, Apr 11, 10:00 AM
Unknown Object (File)
Thu, Apr 11, 8:49 AM
Unknown Object (File)
Thu, Apr 11, 8:49 AM
Unknown Object (File)
Thu, Apr 11, 8:49 AM
Unknown Object (File)
Thu, Apr 11, 8:49 AM
Unknown Object (File)
Thu, Apr 11, 8:18 AM
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
Lint
Lint Skipped
Unit
Tests Skipped

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?

31–32

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).