FaradayRF / faradayio

FaradayRF TUN/TAP adapter
https://www.faradayrf.com
GNU General Public License v3.0
15 stars 6 forks source link

Increase Unit Test Coverage >= 90% #39

Open kb1lqc opened 6 years ago

kb1lqc commented 6 years ago

We currently have about 79% coverage for a unit test. Let's bring that test coverage above 90%!

Coveralls Data

Coverage Status https://coveralls.io/github/FaradayRF/faradayio?branch=master

Files to Test

Unit Test Files

Coverage Report Generation

We use coveralls-python to generate coverage reports. The .coveragerc file defines that we only test the module faradayio and our travis.yml file specifies the coverage test on line 11

The issue ticket documenting adding unit test coverage with coveralls is #30 which could be of help when working with the tools.

kb1lqc commented 6 years ago

An observation: Unit Testing the run() function could automatically test the monitorTUN() function as well.

https://coveralls.io/builds/15714182/source?filename=faradayio/faraday.py#L217

kb1lqc commented 6 years ago

@hdkmike, @reillyeon, @nedbat I'm seeing odd operation of coverage

https://coveralls.io/builds/15752681/source?filename=faradayio/faraday.py

The above coverage report agrees with my local use of coverage. It's pretty clear that the run() code is not being included in the coverage test output. This is odd because I am using --concurrancy=thread and also using the Threading.thread module as the documentation suggests.

I also attempted to use --timid with no effect.

I'm at a loss here. I will probably remove this ticket from the current project and keep it on the backburner. It may even make me look at asyncio again now that the TUN code is working.