AnemoneLabs / unmessage

Privacy enhanced instant messenger
GNU General Public License v3.0
42 stars 7 forks source link

Add hypothesis tests for the packets module #46

Closed felipedau closed 7 years ago

felipedau commented 7 years ago

Most of the checks of the functions that build unMessage packets from a netstring do size checking and therefore can be easily tested with hypothesis.

Other tests for input that might or might not be base64 encoded could be added as well.

(This PR has been opened mostly to test the coverage diff, but can group all of these similar packet tests)

codecov-io commented 7 years ago

Codecov Report

Merging #46 into develop will increase coverage by 1.79%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop     #46      +/-   ##
==========================================
+ Coverage     7.76%   9.56%   +1.79%     
==========================================
  Files           21      21              
  Lines         3322    3378      +56     
==========================================
+ Hits           258     323      +65     
+ Misses        3064    3055       -9
Impacted Files Coverage Δ
tests/test_packets.py 100% <100%> (ø) :arrow_up:
unmessage/gui.py 0% <0%> (ø) :arrow_up:
unmessage/contact.py 0% <0%> (ø) :arrow_up:
unmessage/peer.py 0% <0%> (ø) :arrow_up:
unmessage/utils.py 0% <0%> (ø) :arrow_up:
unmessage/packets.py 86% <0%> (+32%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c81ac8b...ae8f8be. Read the comment docs.