Capitains / HookTest

Testing script for Hook
Mozilla Public License 2.0
3 stars 3 forks source link

Don't assert on empty directories. #144

Closed rillian closed 5 years ago

rillian commented 5 years ago

When run on a directory with no cts data at all, the report generator for hooktest --console would throw a StatisticsError trying to calculate the mean coverage over zero files. Check for this condition and report zero coverage instead.

Add a test for this condition, invoking hooktest on the included emptyDir fixture.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.01%) to 95.71% when pulling f5ae4aaddc33f4c170555241b4031eca6a9cca6e on rillian:emptydir into 6f46fa7dd56e3e0f818750f71330d7182ae8f7aa on Capitains:master.

PonteIneptique commented 5 years ago

That's definitely a change that was needed ! Thanks ;)